Bug 166595 - support moving bugs across products
Summary: support moving bugs across products
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.1   Edit
Assignee: Frank Becker CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy, plan
: 175324 202311 (view as bug list)
Depends on: 219911 260963 265378
Blocks: 244553 248369
  Show dependency tree
 
Reported: 2006-12-02 06:56 EST by Mik Kersten CLA
Modified: 2009-08-12 22:49 EDT (History)
5 users (show)

See Also:


Attachments
first part of patch (8.93 KB, patch)
2008-09-14 15:33 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (3.35 KB, application/octet-stream)
2008-09-14 15:33 EDT, Frank Becker CLA
no flags Details
first cut patch (18.03 KB, patch)
2008-12-21 13:44 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (4.73 KB, application/octet-stream)
2008-12-21 13:44 EST, Frank Becker CLA
no flags Details
first cut patch with fix for bug#219911 (20.23 KB, patch)
2009-01-04 09:03 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (5.30 KB, application/octet-stream)
2009-01-04 09:04 EST, Frank Becker CLA
no flags Details
updated patch (17.99 KB, patch)
2009-01-04 13:19 EST, Steffen Pingel CLA
no flags Details | Diff
mylyn/context/zip (10.62 KB, application/octet-stream)
2009-01-04 13:19 EST, Steffen Pingel CLA
no flags Details
patch for comment#27 (18.50 KB, patch)
2009-01-15 18:22 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (4.03 KB, application/octet-stream)
2009-01-15 18:22 EST, Frank Becker CLA
no flags Details
final patch (19.76 KB, patch)
2009-02-17 16:50 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (8.73 KB, application/octet-stream)
2009-02-17 16:50 EST, Frank Becker CLA
no flags Details
revision (18.60 KB, patch)
2009-02-17 21:09 EST, Robert Elves CLA
no flags Details | Diff
updated revision (18.22 KB, patch)
2009-02-18 15:52 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (6.83 KB, application/octet-stream)
2009-02-18 15:52 EST, Frank Becker 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 2006-12-02 06:56:05 EST
Currently we get the following error, may want to handle this specific case and say it
needs to be done with the Web UI until uspported

org.eclipse.mylar.internal.tasks.core.UnrecognizedReponseException:
<!DOCTYPE "http://www.w3.org/tr/html4/loose.dtd"="" transitional//en"="" public="" "-//w3c//dtd=""
4.01="" html="">
<html>
  <head>
    <title>Verify New Product Details...</title>


<link
href="https://bugs.eclipse.org/bugs/" rel="Top">
...
Comment 1 Mik Kersten CLA 2008-08-19 10:12:37 EDT
We have all the information needed to move bugs across components, and to support creation of bugs without forcing the user to select a component in the wizard (bug 244553).  It is also the biggest chunk of Bugzilla functionality missing from the rich editor.
Comment 2 Frank Becker CLA 2008-08-25 23:57:47 EDT
(In reply to comment #1)
> We have all the information needed to move bugs across components
for components within the same product this already implemented or did you mean something different?
>, and to
> support creation of bugs without forcing the user to select a component in the
> wizard (bug 244553).
Should this mean that we define an default Product/Component and let the user change that Product/Component after creation?
>  It is also the biggest chunk of Bugzilla functionality
> missing from the rich editor.
Please give me some more information and I look what can be done here.
Comment 3 Mik Kersten CLA 2008-09-05 00:13:58 EDT
(In reply to comment #2)
> for components within the same product this already implemented or did you mean
> something different?

Sorry, I meant products!  I updated the summary accordingly.

> Should this mean that we define an default Product/Component and let the user
> change that Product/Component after creation?

I figure that the simplest way to make this happen is the following, since it avoids forcing the user to have to deal with an extra wizard page/dialog, which is effectively what the Bugzilla Web UI does.
1) User changes the Product attribute, causing the task editor to make the values of the attributes that no longer match be blank (Component and Target milestone).
2) User cannot submit the task editor until those values are selected, similar to how they currently cannot submit a new task editor without selecting the product.

How does that sound?
Comment 4 Frank Becker CLA 2008-09-06 15:25:51 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > for components within the same product this already implemented or did you
> mean
> > something different?
> 
> Sorry, I meant products!  I updated the summary accordingly.
> 
> > Should this mean that we define an default Product/Component and let the user
> > change that Product/Component after creation?
> 
> I figure that the simplest way to make this happen is the following, since it
> avoids forcing the user to have to deal with an extra wizard page/dialog, which
> is effectively what the Bugzilla Web UI does.
> 1) User changes the Product attribute, causing the task editor to make the
> values of the attributes that no longer match be blank (Component and Target
> milestone).
> 2) User cannot submit the task editor until those values are selected, similar
> to how they currently cannot submit a new task editor without selecting the
> product.
> 
> How does that sound?

OK, now I think I can create a patch for this.
Is this OK that I start this after 3.0.2 is released?
Comment 5 Mik Kersten CLA 2008-09-07 15:53:41 EDT
Excellent.  Yes, post 3.0.2 is good timing for this, since it's too big a change for 3.0.2.
Comment 6 Frank Becker CLA 2008-09-14 15:33:07 EDT
Created attachment 112518 [details]
first part of patch

included is the new Editor for Bugzilla Products that has support for update of the Component and the Target Milestone attributes.

I need some help for the implementation of the UI part.

What is the way to get the editor  of an other attribute (Component or Target Milestone) from Product Editor
Comment 7 Frank Becker CLA 2008-09-14 15:33:12 EDT
Created attachment 112519 [details]
mylyn/context/zip
Comment 8 Mik Kersten CLA 2008-10-01 23:00:57 EDT
Rob: Please reivew.
Comment 9 Jörg Thönnes CLA 2008-10-02 01:31:37 EDT
Hello,

since we are about to migrate from our self made bug tracker accessed by the Generic Web Connector to a Trac system, I wonder how far this bug has been progressed. Will it be possible to move bugs from the Generic Web connector to Trac using Mylyn? This would be really great stuff!

Looking forward to see this in one of the next weekly builds?

Thanks, Jörg
Comment 10 Steffen Pingel CLA 2008-10-02 02:05:23 EDT
This bug is specific to the Bugzilla connector for moving bugs across products within a sinlge Bugzilla repository.

 Mylyn currently does not have built-in functionality for migrating bugs between repositories but this could be implemented based on the tasks core API. Joerg, please file a separate bug for that detailing your use case.
Comment 11 Jörg Thönnes CLA 2008-10-02 03:07:53 EDT
(In reply to comment #10)
> This bug is specific to the Bugzilla connector for moving bugs across products
> within a sinlge Bugzilla repository.
> 
> Mylyn currently does not have built-in functionality for migrating bugs between
> repositories but this could be implemented based on the tasks core API. Joerg,
> please file a separate bug for that detailing your use case.

Done, see:

249434: [discussion] Copy tasks to different connector
https://bugs.eclipse.org/bugs/show_bug.cgi?id=249434
Comment 12 Robert Elves CLA 2008-10-07 03:23:50 EDT
*** Bug 175324 has been marked as a duplicate of this bug. ***
Comment 13 Robert Elves CLA 2008-10-22 01:39:38 EDT
(In reply to comment #6)
> Created an attachment (id=112518)
> first part of patch
> 
> included is the new Editor for Bugzilla Products that has support for update of
> the Component and the Target Milestone attributes.
> 
> I need some help for the implementation of the UI part.
> 
> What is the way to get the editor  of an other attribute (Component or Target
> Milestone) from Product Editor
Implementing a map from attribute -> editor part is being considered for 3.1 (bug#248369). 
Comment 14 Steffen Pingel CLA 2008-12-19 11:43:00 EST
Given the current plan providing a mapping between data model and UI elements is probably not going to make it into 3.2. Here is how I could see this getting implemented for Bugzilla in time for 3.1:

Track the mapping between task attributes and attribute editors in the factory created by BugzillaTaskEditorPage.createAttributeEditorFactory().

 Register a listener using BugzillaTaskEditorPage.getModel().addModelListener() that gets notified when a product is selected. Update other attributes (component, versions, milestone) accordingly and refresh the UI. This would require AbstractTaskEditorPart to implement refresh() and a similar method on AbstractAttributeEditor. 
 
Frank, as a first cut we could implement the Bugzilla portion and the UI refresh for TaskEditorAttributePart and SingleSelectionAttributeEditor. That should be sufficient to resolve this bug and we can then consider applying the same change to other attribute editors and moving more of the functionality into the framework. Would you be interested in taking a pass at this?
 
Comment 15 Frank Becker CLA 2008-12-21 07:30:57 EST
(In reply to comment #14)
> Given the current plan providing a mapping between data model and UI elements is
> probably not going to make it into 3.2. Here is how I could see this getting
> implemented for Bugzilla in time for 3.1:
> 
> Track the mapping between task attributes and attribute editors in the factory
> created by BugzillaTaskEditorPage.createAttributeEditorFactory().
> 
> Register a listener using BugzillaTaskEditorPage.getModel().addModelListener()
> that gets notified when a product is selected. Update other attributes
> (component, versions, milestone) accordingly and refresh the UI. This would
> require AbstractTaskEditorPart to implement refresh() and a similar method on
> AbstractAttributeEditor.
> 
> Frank, as a first cut we could implement the Bugzilla portion and the UI refresh
> for TaskEditorAttributePart and SingleSelectionAttributeEditor. That should be
> sufficient to resolve this bug and we can then consider applying the same change
> to other attribute editors and moving more of the functionality into the
> framework. Would you be interested in taking a pass at this?
OK, I start with this now.
Comment 16 Frank Becker CLA 2008-12-21 13:44:53 EST
Created attachment 121030 [details]
first cut patch

see comment#14
Comment 17 Frank Becker CLA 2008-12-21 13:44:58 EST
Created attachment 121031 [details]
mylyn/context/zip
Comment 18 Steffen Pingel CLA 2008-12-22 15:20:22 EST
The patch looks very good! I'll take a second pass at it and will go over it with Rob, so we get this into 3.1.
Comment 19 Frank Becker CLA 2009-01-04 09:03:59 EST
Created attachment 121482 [details]
first cut patch with fix for bug#219911

Sorry I forgot to include the patch for bug #219911 in the last patch.
Comment 20 Frank Becker CLA 2009-01-04 09:04:02 EST
Created attachment 121483 [details]
mylyn/context/zip
Comment 21 Steffen Pingel CLA 2009-01-04 13:19:24 EST
Created attachment 121492 [details]
updated patch
Comment 22 Steffen Pingel CLA 2009-01-04 13:19:26 EST
Created attachment 121493 [details]
mylyn/context/zip
Comment 23 Steffen Pingel CLA 2009-01-04 13:19:56 EST
Rob, please review the patch.
Comment 24 Steffen Pingel CLA 2009-01-04 13:25:36 EST
The main changes in the updated patch is that I moved some of the implementation from AbstractTaskEditorPage to BugzillaTaskEditorPage. We can consider moving that back once the API is stabilized. I also refactored some of the code in the attribute editors to avoid code duplication.
Comment 25 Steffen Pingel CLA 2009-01-06 18:29:50 EST
Frank, if I test this patch with the Mylyn Bugzilla 2.22 repository I still get an error message that asks me to "Verify New Product Details...". Have you been able to move bugs between products without getting this error?
Comment 26 Frank Becker CLA 2009-01-07 14:23:48 EST
(In reply to comment #25)
> Frank, if I test this patch with the Mylyn Bugzilla 2.22 repository I still get
> an error message that asks me to "Verify New Product Details...". Have you been
> able to move bugs between products without getting this error?

Yes I get this error to. Until bug# 259670 is fixed wo need to set the "Reassign to default assignee" within the attribute section by hand.
Comment 27 Robert Elves CLA 2009-01-15 14:26:57 EST
Frank, I'll be applying your current patch but to the new task editor only to implement bug#244553. 

Would you be willing to investigate a workaround to the problem of Bugzilla always asking to verify the details upon moving an *existing* bug to another product.  For example, if upon posting the task data we get back the verify page, we could immediately post (all from within the client) the information we already have from the task data.  

Also, if you could file a bug against bugzilla.org requesting that if valid data is passed (i.e. for version) when moving products that they simply return the standard 'Changes submitted' page.
Comment 28 Frank Becker CLA 2009-01-15 18:22:01 EST
Created attachment 122759 [details]
patch for comment#27

To not show the verification page I add the Attribute "confirm_product_change" which was included in the verification html
Comment 29 Frank Becker CLA 2009-01-15 18:22:06 EST
Created attachment 122761 [details]
mylyn/context/zip
Comment 30 Robert Elves CLA 2009-01-15 20:33:54 EST
(In reply to comment #28)
> Created an attachment (id=122759)
> patch for comment#27
> 
> To not show the verification page I add the Attribute "confirm_product_change"
> which was included in the verification html
This is great news Frank!  I'll take a look...
Comment 31 Robert Elves CLA 2009-01-15 22:10:52 EST
Frank, this works great on Bugzilla 3.2. Is there a similar attribute to make the older 2.22 and 2.18 repos work as well?
Comment 32 Frank Becker CLA 2009-01-16 18:11:27 EST
(In reply to comment #31)
> Frank, this works great on Bugzilla 3.2. Is there a similar attribute to make
> the older 2.22 and 2.18 repos work as well?
> 

My oldest version is 3.0.4 and there this field is also included.
(<input type="hidden" name="confirm_product_change" value="1">)

If it is possible to an an other product to the mylyn.eclipse.org/bugs??? repositories I can try if this is present.
Comment 33 Robert Elves CLA 2009-01-16 18:35:57 EST
You can have a look at http://mylyn.eclipse.org/bugs222/show_bug.cgi?id=80
Comment 34 Frank Becker CLA 2009-01-17 16:27:53 EST
(In reply to comment #33)
> You can have a look at http://mylyn.eclipse.org/bugs222/show_bug.cgi?id=80
> 

OK, I found that this field confirm_product_change was not in bugs222 but in 3.0. So we need to restrict the product change to work for >= 3.0 or find a way for the older version. What do you think?
Comment 35 Robert Elves CLA 2009-01-22 19:00:21 EST
(In reply to comment #34)
> (In reply to comment #33)
> > You can have a look at http://mylyn.eclipse.org/bugs222/show_bug.cgi?id=80
> >
> 
> OK, I found that this field confirm_product_change was not in bugs222 but in
> 3.0. So we need to restrict the product change to work for >= 3.0 or find a way
> for the older version. What do you think?
Agreed.  We'll need to just allow this functionality on existing bugs for >= 3.0 but can enable for all new bugs.
Comment 36 Frank Becker CLA 2009-01-23 12:53:52 EST
I wait until we have the patch for bug#260963 until I add a new call to getInstallVersion
Comment 37 Frank Becker CLA 2009-02-17 16:50:06 EST
Created attachment 125946 [details]
final patch

(In reply to comment #36)
> I wait until we have the patch for bug#260963 until I add a new call to
> getInstallVersion
>
Comment 38 Frank Becker CLA 2009-02-17 16:50:12 EST
Created attachment 125947 [details]
mylyn/context/zip
Comment 39 Robert Elves CLA 2009-02-17 21:09:18 EST
Created attachment 125965 [details]
revision

Works great! Minor updates:

* added refresh of target milestone field
* removed a method in BugzillaTaskEditorPage and reduced visibility of others

Frank if you could do a sanity check on these changes that would be great. You may be able to eliminate some duplicate code in the ProductSelectionListener?

Steffen, do you want to take a quick look at where this patch touches the attribute editors?
Comment 40 Frank Becker CLA 2009-02-18 15:52:22 EST
Created attachment 126067 [details]
updated revision

(In reply to comment #39)
> Created an attachment (id=125965)
> revision
> 
> Works great! Minor updates:
> 
> * added refresh of target milestone field
 Did you mean version field?
> * removed a method in BugzillaTaskEditorPage and reduced visibility of others
> 
> Frank if you could do a sanity check on these changes that would be great. You
> may be able to eliminate some duplicate code in the ProductSelectionListener?
> 
I only remove commeted code (BugzillaTaskEditorPage.refresh)
> Steffen, do you want to take a quick look at where this patch touches the
> attribute editors?
Comment 41 Frank Becker CLA 2009-02-18 15:52:26 EST
Created attachment 126068 [details]
mylyn/context/zip
Comment 42 Steffen Pingel CLA 2009-02-18 16:02:58 EST
> Steffen, do you want to take a quick look at where this patch touches the
> attribute editors?

Looks good.
Comment 43 Robert Elves CLA 2009-02-18 16:56:48 EST
Great. Frank if you want to commit this, I'll merge with my changes for the new task toolbar menu.
Comment 44 Frank Becker CLA 2009-02-18 17:05:22 EST
(In reply to comment #43)
> Great. Frank if you want to commit this, I'll merge with my changes for the new
> task toolbar menu.

Patch commited.
Comment 45 Steffen Pingel CLA 2009-02-18 17:24:23 EST
Great stuff Frank!
Comment 46 Robert Elves CLA 2009-02-19 16:00:29 EST
Marking resolved.
Comment 47 Steffen Pingel CLA 2009-08-12 22:49:50 EDT
*** Bug 202311 has been marked as a duplicate of this bug. ***