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

Bug 165072

Summary: when submitting changes from a rich editor into the repository, it would be nice to see who were notified
Product: z_Archived Reporter: Erkki Lindpere <villane>
Component: MylynAssignee: Frank Becker <eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: eclipse, ekuleshov, robert.elves, steffen.pingel, wmitsuda
Version: unspecifiedKeywords: helpwanted
Target Milestone: 3.2   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 202879    
Bug Blocks:    
Attachments:
Description Flags
patch
none
mylyn/context/zip
none
updated patch
none
mylyn/context/zip
none
commited patch
none
mylyn/context/zip none

Description Erkki Lindpere CLA 2006-11-18 08:47:06 EST
I often want to know who exactly was notified of a change I submitted to a bug/task in a repository. There is of course the CC list etc., but this alone doesn't always help -- different repositories might have different policies on when notifications are sent. At least Bugzilla's and ChangeLogic's web UI shows who was notified after a change was made and I'm very used to it.
I don't know for which repositories this would be possible, so I'm filing this under the UI component.
Comment 1 Mik Kersten CLA 2006-11-22 00:35:26 EST
It's best if we do this for one connector first, and then try to generalize it.  Since we would ideally show this in the editor before submission, we would need a facility for determining who will get notified.  Alternatively if we did get a status on notification back, or a web page in the case of the web connector, we could try to figure out UI for showing that.  I don't think that we should show a dialog each time though.
Comment 2 Erkki Lindpere CLA 2006-11-22 02:37:02 EST
Yes, a dialog each time would be annoying. Maybe something like the incoming task notifications and clicking on that notification could open a dialog.
Comment 3 Mik Kersten CLA 2007-09-10 23:16:11 EDT
A design for this is needed before we proceed with an implementation.  It is feasible that we could have this in some kind of on-demand (e.g. tooltip) popup in some portion of the Task Editor, but the UI design will be tricky since there is no precedent for this kind of notification in the Eclipse UI.
Comment 4 Eugene Kuleshov CLA 2007-09-10 23:19:14 EDT
(In reply to comment #3)
> A design for this is needed... [chop]

You could simply show that list in the tooltip for the status message shown in the same place where warnings and errors are being shown.
Comment 5 Mik Kersten CLA 2007-09-11 00:16:14 EDT
(In reply to comment #4)
> You could simply show that list in the tooltip for the status message shown in
> the same place where warnings and errors are being shown.

That's a reasonable suggestion, although it would mean that this transient information would commonly make the top of the editor very busy looking.  But this would be a good place to start and we could iterate on the UI later.

This is still not a good bugday candidate because it has other dependencies, but help is certainly welcome from anyone interested in tackling this one.  I created bug 202879 for the API dependency, so if anyone is looking at this please feel free to push us on doing that.  Resolving this would also likely require screen scraping the response from Bugzilla, so please inquire with Rob about that because different localizations and customizations of Bugzilla make parsing that response fragile.
Comment 6 Eugene Kuleshov CLA 2007-09-11 00:19:05 EDT
(In reply to comment #5)
> That's a reasonable suggestion, although it would mean that this transient
> information would commonly make the top of the editor very busy looking.

I was saying that info message would read "submitted successfully" and tooltip for that message would show all the details
Comment 7 Frank Becker CLA 2009-05-10 09:19:36 EDT
Created attachment 135069 [details]
patch

Here is a Patch using th API from bug#202879#c18

Other things:
In BugzillaClient I add some  //$NON-NLS-
Comment 8 Frank Becker CLA 2009-05-10 09:19:40 EDT
Created attachment 135070 [details]
mylyn/context/zip
Comment 9 Steffen Pingel CLA 2009-05-19 03:47:44 EDT
The patch looks good to me. One change I would like to suggest is to create a BugzillaRepositoryResponse class that holds the additional fields and cast that in BugzillaTaskEditor instead of changing RepositoryResponse.

When I tested the patch with http://mylyn.eclipse.org/bugs30/show_bug.cgi?id=30 I noticed that the message in the Task Editor only said "Excluding..." but omitted the "Email sent to..." part which made it less clear. Full message from the web interface:

Changes submitted for bug 30

    Email sent to:
        no one 
    Excluding:
        tests@mylyn.eclipse.org 
 
I'll tentatively put this on for 3.2. Rob, what are your thoughts?
Comment 10 Frank Becker CLA 2009-05-21 07:11:26 EDT
Created attachment 136642 [details]
updated patch

(In reply to comment #9)
> The patch looks good to me. One change I would like to suggest is to create a
> BugzillaRepositoryResponse class that holds the additional fields and cast that
> in BugzillaTaskEditor instead of changing RepositoryResponse.
> 
> When I tested the patch with http://mylyn.eclipse.org/bugs30/show_bug.cgi?id=30
> I noticed that the message in the Task Editor only said "Excluding..." but
> omitted the "Email sent to..." part which made it less clear. Full message from
> the web interface:
> 
> Changes submitted for bug 30
> 
> Email sent to:
> no one
> Excluding:
> tests@mylyn.eclipse.org

This is because the parse of the html looks only for <dt> and <code> tag but 'no one' is not between <code> and </code>.

Should I fix this by implement an complexer parse?
> 
> I'll tentatively put this on for 3.2. Rob, what are your thoughts?
Comment 11 Frank Becker CLA 2009-05-21 07:11:37 EDT
Created attachment 136643 [details]
mylyn/context/zip
Comment 12 Steffen Pingel CLA 2009-05-25 23:12:41 EDT
Patch looks good to me. I only have a few suggestions:

* Change the condition in BugzillaTaskEditorPage.handleTaskSubmitted() to this: if (event.getJob().getStatus() == null && event.getJob().getResponse() instanceof BugzillaRepositoryResponse) 
* Use NLS.bind() instead of MessageFormat.format(), it works the same way.
* If parsing of the response of a successful submission fails, should we just ignore IOException and return a successful status?

Frank, can you make these changes and then go ahead and commit?
Comment 13 Frank Becker CLA 2009-05-26 17:54:25 EDT
Created attachment 137235 [details]
commited patch

comment#12 is now included
Comment 14 Frank Becker CLA 2009-05-26 17:54:28 EDT
Created attachment 137236 [details]
mylyn/context/zip
Comment 15 Frank Becker CLA 2009-05-26 17:55:35 EDT
patch is commited
Comment 16 David Shepherd CLA 2009-05-27 13:58:37 EDT
I like this feature a lot, thanks!  I had one confusion, however.  The basic messaging of the popup is great in most cases:
    Email sent to:
        no one 
    Excluding:
        tests@mylyn.eclipse.org 
However, when I clicked on the message for the first time I saw:
    Excluding:
        tests@mylyn.eclipse.org 
When the message does not include the "email sent to" part the "excluding" label doesn't have a clear meaning.
Comment 17 Eugene Kuleshov CLA 2009-05-27 15:06:01 EDT
Can someone please clarify, if I am not mistaken it now adds the link to the editor header area and user can click on it to see the information about notified parties. But then submission triggers a background task job that can refresh the editor, so this link will be gone when refresh is completed. Am I right?
Comment 18 Frank Becker CLA 2009-05-27 15:24:53 EDT
(In reply to comment #16)
> I like this feature a lot, thanks!  I had one confusion, however.  The basic
> messaging of the popup is great in most cases:
>     Email sent to:
>         no one 
>     Excluding:
>         tests@mylyn.eclipse.org 
> However, when I clicked on the message for the first time I saw:
>     Excluding:
>         tests@mylyn.eclipse.org 
> When the message does not include the "email sent to" part the "excluding"
> label doesn't have a clear meaning.
> 

Here we have the problem that the html returned by Bugzilla is hard to parse. Please see comment#10.

Hope that an newer Bugzilla version (>3.4) generate better html or we can switch to the Webservice API when all needed information are included.
Comment 19 Steffen Pingel CLA 2009-05-27 16:33:14 EDT
(In reply to comment #17)
> Can someone please clarify, if I am not mistaken it now adds the link to the
> editor header area and user can click on it to see the information about
> notified parties. But then submission triggers a background task job that can
> refresh the editor, so this link will be gone when refresh is completed. Am I
> right?

The feature is now available on the weekly site. Please try it and reopen this bug if you are encountering unexpected behavior.