This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 202879 - [api] provide mechanism for reporting task submission status
Summary: [api] provide mechanism for reporting task submission status
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: 3.2   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 165072 168204
  Show dependency tree
 
Reported: 2007-09-11 00:08 EDT by Mik Kersten CLA
Modified: 2009-05-14 16:55 EDT (History)
3 users (show)

See Also:


Attachments
Proof of concept for bugzilla (18.78 KB, patch)
2007-12-09 14:40 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (9.11 KB, application/octet-stream)
2007-12-09 14:40 EST, Frank Becker CLA
no flags Details
New Patch (19.49 KB, patch)
2007-12-23 17:21 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (3.54 KB, application/octet-stream)
2007-12-23 17:21 EST, Frank Becker CLA
no flags Details
patch (1.27 KB, patch)
2009-05-07 17:41 EDT, Steffen Pingel CLA
no flags Details | Diff
mylyn/context/zip (11.05 KB, application/octet-stream)
2009-05-07 17:41 EDT, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mik Kersten CLA 2007-09-11 00:08:39 EDT
A connector may wish to report the status of a task submission.  For example, the Bugzilla Web UI reports who was notified of the change to the bug (bug 165072).

Rob: AbstractRepositoryConnector may not be structured right for this, but is there another place in the API where we can report this status?
Comment 1 Robert Elves CLA 2007-09-12 02:14:29 EDT
AbstractTaskDataHandler.postTaskData() could return data structure that in some what wraps:
* error status (if any)
* reference to new bug id in case of new bug submission
* connector specific key, value pairs
Comment 2 Frank Becker CLA 2007-12-03 15:32:40 EST
 (In reply to comment #1)
> AbstractTaskDataHandler.postTaskData() could return data structure that in some
> what wraps:
> * error status (if any)
> * reference to new bug id in case of new bug submission
> * connector specific key, value pairs

Is it OK that I now start with this?

Is it OK to now change the resulttype of AbstractTaskDataHandler.postTaskData()
Comment 3 Frank Becker CLA 2007-12-09 14:40:48 EST
Created attachment 84813 [details]
Proof of concept for bugzilla

Please check if this can be the way how to implement this.
Comment 4 Frank Becker CLA 2007-12-09 14:40:51 EST
Created attachment 84814 [details]
mylyn/context/zip
Comment 5 Frank Becker CLA 2007-12-23 17:21:24 EST
Created attachment 85769 [details]
New Patch

This Patch is the base implementation for bug168204.

This demostrate how to use this for Bugzilla.
Comment 6 Frank Becker CLA 2007-12-23 17:21:25 EST
Created attachment 85770 [details]
mylyn/context/zip
Comment 7 Robert Elves CLA 2008-01-15 14:55:06 EST
Frank, we need to work out a general solution for post task submission work flow, which ties directly into what you have done here. This needs to be taken into account along with the other work being done on bug#179254.  Steffen and I will need to review this together so are unfortunately blocking on this at the moment while other work is completed. Once this is done we can integrate your patch. 
Comment 8 Mik Kersten CLA 2008-02-25 20:46:19 EST
Rob, Frank: we are at the 2.3 freeze, so this will need to wait until 3.0.  
Comment 9 Steffen Pingel CLA 2008-04-26 00:17:20 EDT
I have changed the API in AbstractTaskDataHandler2 to return an object of type RepositoryResponse (see bug 194570). Connectors can extend that type to return a custom response from the repository. This response object will be available to the editor.

Frank, this is similar to the proposed change in your patch. Please check if the new API is suitable for your requirements. Please note that the new API is not used at the moment and will require porting of the Bugzilla connector to the new task data / editor architecture 
Comment 10 Frank Becker CLA 2008-04-26 10:45:17 EDT
 (In reply to comment #9)
> I have changed the API in AbstractTaskDataHandler2 to return an object of type
> RepositoryResponse (see bug 194570). Connectors can extend that type to return a
> custom response from the repository. This response object will be available to
> the editor.
Did you think that a Connector like Bugzilla should subclass RepositoryResponse. If so I think it is better to rename this class to AbstractRepositoryResponse .
> 
> Frank, this is similar to the proposed change in your patch. Please check if the
> new API is suitable for your requirements.
I think that this is a good base for doing the extensions that we need for email addresses or Content proposals.
> Please note that the new API is not
> used at the moment and will require porting of the Bugzilla connector to the new
> task data / editor architecture
Is there an other bug that I can watch so that I know when I can start.
Or do you think that we do this within this bug.
Is this your task or do you think that I should take this?
Comment 11 Steffen Pingel CLA 2008-04-26 16:09:11 EDT
> Did you think that a Connector like Bugzilla should subclass RepositoryResponse.
> If so I think it is better to rename this class to AbstractRepositoryResponse .

My sense is that most connector won't have a need to extend the class. The framework currently only uses two different responses: "task created" and "task updated". This will be sufficient for JIRA and Trac as other cases are error cases and will be indicated by an exception.

> >
> > Frank, this is similar to the proposed change in your patch. Please check if
> the
> > new API is suitable for your requirements.
> I think that this is a good base for doing the extensions that we need for email
> addresses or Content proposals.

Great. We can still extend / change the API based on requirements for Bugzilla.

> > Please note that the new API is not
> > used at the moment and will require porting of the Bugzilla connector to the
> new
> > task data / editor architecture
> Is there an other bug that I can watch so that I know when I can start.
> Or do you think that we do this within this bug.
> Is this your task or do you think that I should take this?

I am not sure if there is a bug, yet. Rob as the maintainer of the Bugzilla component will be managing any porting. I am currently using the JIRA connector as the driver for the API refactorings. To track progress it is best to create a query for all bugs that contain"[api]" in the summary and that are scheduled for the "3.0" milestone. Getting these bugs fixed is currently our highest priority and all api changes/enhancements are tracked on those bugs.

Frank, I am reassigning this bug to you since there is still an open patch attached that extends Bugzilla's error handling. 
Comment 12 Mik Kersten CLA 2008-06-12 19:08:07 EDT
Need to defer applying: http://wiki.eclipse.org/index.php/Mylyn/3.0_Plan#Deferred_Items
Comment 13 Steffen Pingel CLA 2008-09-20 01:37:11 EDT
Is there a driver or open bug for incorporating the code from the patch on this bug?
Comment 14 Mik Kersten CLA 2008-10-01 22:43:13 EDT
Part of me it seems relevant for the sake of completeness, since it is something that the Web UI offers, and is useful for know when someone is watching bugs.  However, it partly goes against the normal mode of working in Mylyn, which does not rely on email notifications.

In terms of UI, one thing I can imagine us doing with it is having an Info message that says "Submitted..." and then a tooltip that shows all the email addresses notified of the change.
Comment 15 Steffen Pingel CLA 2009-05-05 17:42:47 EDT
Frank, could you port your patch to the current head and change your implementation to extend RepositoryResponse in a Bugzilla specific way, i.e. create a subclass in the Bugzilla core plug-in that has additional fields?

We can then discuss ways to make the result of the task submit job available to the task editor.
Comment 16 Steffen Pingel CLA 2009-05-05 18:01:22 EDT
Disregard my last comment, I just realized that this has already been implemented on bug 168204.

How about this: We add a new method to the task editor page which is invoked after a submit, e.g.:

 protected void taskSubmitted(SubmitJobEvent event);
 
The event object would provide access to the details, i.e. the status of the submit job and RepositoryResponse object. The Bugzilla task editor page could override the method and handle the result accordingly.

Frank, would that suffice to implement bug 165072 and bug 168204?
Comment 17 Frank Becker CLA 2009-05-07 15:55:52 EDT
(In reply to comment #16)
> Disregard my last comment, I just realized that this has already been
> implemented on bug 168204.
> 
> How about this: We add a new method to the task editor page which is invoked
> after a submit, e.g.:
> 
> protected void taskSubmitted(SubmitJobEvent event);
> 
> The event object would provide access to the details, i.e. the status of the
> submit job and RepositoryResponse object. The Bugzilla task editor page could
> override the method and handle the result accordingly.
> 
> Frank, would that suffice to implement bug 165072 and bug 168204?

Steffen,

is it OK that I do this in the following way
1) update the patch for bug 168204 and create the SubmitJobEvent
2) do this bug 
3) go to create a patch for 165072

What is the timeframe to get this done and reach the 3.2 version? If time is to short can you take over one or more steps?
Comment 18 Steffen Pingel CLA 2009-05-07 17:41:42 EDT
Created attachment 134890 [details]
patch
Comment 19 Steffen Pingel CLA 2009-05-07 17:41:46 EDT
Created attachment 134891 [details]
mylyn/context/zip
Comment 20 Steffen Pingel CLA 2009-05-07 17:54:16 EDT
> 1) update the patch for bug 168204 and create the SubmitJobEvent
> 2) do this bug
> 3) go to create a patch for 165072

That sounds good. I have attached a patch to this bug with the proposed API. When working on the other bugs you can assume that this API exists but I don't want to commit it until we know it is sufficient. Note that there is one outstanding problem that needs to be fixed when a new bug is submitted: The handleTaskSubmitted() method should be invoked on the newly created editor in that case.

> What is the timeframe to get this done and reach the 3.2 version? If time is to
> short can you take over one or more steps?

My list for 3.2 is already overloaded so I probably won't have time. It would be great if we had a first working version of the user match mode support by 3.2M2 (May 15th) which would give us some time to review and work out any problems.

In case that is not enough time you could consider prioritizing bug 165072 which is less valuable but might be simpler to tackle.
Comment 21 Steffen Pingel CLA 2009-05-14 16:55:59 EDT
Patch comitted.