Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349598

Summary: PersonProposalProvider should set currentUser when populated by connectors
Product: z_Archived Reporter: Mike Wu <mike.wu>
Component: MylynAssignee: Mike Wu <mike.wu>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: steffen.pingel
Version: unspecifiedKeywords: contributed
Target Milestone: 3.7   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
always try to set currentUser when populating addressSet
none
set currentUser if it's in the proposals
none
updated patch
steffen.pingel: iplog+
mylyn/context/zip none

Description Mike Wu CLA 2011-06-16 13:20:58 EDT
Current user is not set and highlighted in content assist if the address set is populated by the proposals provided by the connector.
Comment 1 Mike Wu CLA 2011-06-16 13:32:40 EDT
Created attachment 198137 [details]
always try to set currentUser when populating addressSet
Comment 2 Frank Becker CLA 2011-06-16 15:54:10 EDT
I review this after I recreate the patch for bug# 168204 ([patch] support bugzilla's usermatchmode for matching names to email addresses).
Comment 3 Steffen Pingel CLA 2011-06-16 16:17:59 EDT
Thanks for the patch Mike. I am not sure that we would want to make that change. The intention of the API is to provide control over the proposals to a client. Can you give an example of a concrete use case? Would you be able to explicitly add the repository user to the list of proposals?
Comment 4 Steffen Pingel CLA 2011-06-16 16:19:34 EDT
Frank, I'll reassign this to the inbox for now until we have converged on the implementation.
Comment 5 Mike Wu CLA 2011-06-16 16:34:00 EDT
Created attachment 198148 [details]
set currentUser if it's in the proposals

I see what you mean.  The main purpose for me is to set the currentUser field to repository user so that the Tasktop Planner knows which to highlight as "me"; it's not necessary to add it the list as well.  I just created another patch that will not alter the proposals but simply set currentUser if it's in the list.  What do you think?
Comment 6 Steffen Pingel CLA 2011-07-18 15:55:38 EDT
Mike, some changes were made to PersonProposalProvider recently which unfortunately broke your patch. Would you be able to attach a new version against the current master?
Comment 7 Mike Wu CLA 2011-08-11 17:54:29 EDT
Created attachment 201360 [details]
updated patch

Sorry about the delay, Steffen.  Here's the updated patch.  This is also my first patch created with Git, so hopefully it will work for you.
Comment 8 Mike Wu CLA 2011-08-11 17:54:30 EDT
Created attachment 201361 [details]
mylyn/context/zip
Comment 9 Steffen Pingel CLA 2011-08-12 06:56:32 EDT
Thanks Mike! I have applied the patch and made one minor adjustment. If a list of users is provided currentUser is set regardless. This avoids a few comparisons and should not do any harm.
Comment 10 Mike Wu CLA 2011-08-12 13:06:02 EDT
Great!  Thanks Steffen!