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

Bug 311966

Summary: create XMLRPC operation for status transition
Product: z_Archived Reporter: Frank Becker <eclipse>
Component: MylynAssignee: Charley Wang <charley.wang>
Status: RESOLVED FIXED QA Contact: Frank Becker <eclipse>
Severity: enhancement    
Priority: P2 CC: robert.elves, steffen.pingel
Version: 3.4   
Target Milestone: 3.5   
Hardware: Macintosh   
OS: All   
Whiteboard:
Bug Depends on: 259291, 282211, 318268    
Bug Blocks:    
Attachments:
Description Flags
POC
none
mylyn/context/zip
none
Patch v0.1
none
Patch v0.1
none
mylyn/context/zip
none
Enable pulling transitions from xmlrpc
none
mylyn/context/zip
none
Allow Mylyn to use xmlrpc transitions
none
mylyn/context/zip
none
Create xmlrpc configuration
eclipse: iplog+
mylyn/context/zip
none
Tests for 311966
eclipse: iplog+
mylyn/context/zip none

Description Frank Becker CLA 2010-05-06 16:08:49 EDT
bug#259291 adds support for version <3.6 so we use this but to track the needed changes for the 3.6 version.
Comment 1 Frank Becker CLA 2010-05-14 16:40:04 EDT
Created attachment 168610 [details]
POC

here you see what i plan for this.

parseBugStatus of BugzillaClient should go into CustomTransitionManager after bug 295291 is in HEAD.
Comment 2 Frank Becker CLA 2010-05-14 16:40:09 EDT
Created attachment 168611 [details]
mylyn/context/zip
Comment 3 Charley Wang CLA 2010-05-17 20:16:05 EDT
Created attachment 168843 [details]
Patch v0.1

NOTE: Patch is built on the patch in 259291

Needs tweaking and cleaning up. There are places where code from CustomTransitionManager can and should be made recyclable. I left in the UI flow from your POC, but switched to passing in a boolean and creating the XmlRpcClient in RepositoryConfiguration to avoid having to import WebLocation into the UI package (for use in BugzillaRepositorySettingsPage.applyTo). I also don't pass in any AuthenticationCredentials, which will be problematic if xmlrpc.cgi is marked as login-only.

Could perhaps get around this issue by creating a BugzillaXmlRpcClient initializer that takes credentials and Repository URL as arguments? 

I've tested the patch on a local installation, will run full test suites tonight.
Comment 4 Charley Wang CLA 2010-05-17 20:16:42 EDT
Created attachment 168844 [details]
Patch v0.1

Meant to attach as a patch with context
Comment 5 Charley Wang CLA 2010-05-17 20:16:44 EDT
Created attachment 168845 [details]
mylyn/context/zip
Comment 6 Steffen Pingel CLA 2010-05-18 13:42:02 EDT
Is this realistic to get done for 3.4? It seems that we are waiting on the CQ which is unlikely to get resolved for Helios.
Comment 7 Charley Wang CLA 2010-05-18 15:17:59 EDT
(In reply to comment #6)
> Is this realistic to get done for 3.4? It seems that we are waiting on the CQ
> which is unlikely to get resolved for Helios.

Yes, unfortunately it doesn't look like this will be resolved for Helios. I wanted to get something down before I leave later this week.

-Charley
Comment 8 Charley Wang CLA 2010-07-01 12:54:34 EDT
Created attachment 173239 [details]
Enable pulling transitions from xmlrpc

This patch allows CustomTransitionManager to fetch transition data straight from XMLRPC.

The workflow currently allows transitions in the descriptor file to override anything pulled from the xmlrpc. It may be useful to allow the use of both simultaneously (grab Bugzilla workflow settings from the descriptor file, status transitions from xmlrpc), that would be more appropriate to discuss in a separate bug.

If needed, I can split the patch into unit test and non-unit test contributions.

Patch does not include a fix from 318268 which fixes a test failure.

I currently get null errors and time outs when running AllBugzillaTests from unmodified head so I have not yet been able to do a full test run to look for regressions.

Thanks!
Comment 9 Charley Wang CLA 2010-07-01 12:54:37 EDT
Created attachment 173240 [details]
mylyn/context/zip
Comment 10 Frank Becker CLA 2010-07-09 15:04:36 EDT
(In reply to comment #8)
> Created an attachment (id=173239)
> Enable pulling transitions from xmlrpc
> 
> This patch allows CustomTransitionManager to fetch transition data straight from
> XMLRPC.
> 
> The workflow currently allows transitions in the descriptor file to override
> anything pulled from the xmlrpc. It may be useful to allow the use of both
> simultaneously (grab Bugzilla workflow settings from the descriptor file, status
> transitions from xmlrpc), that would be more appropriate to discuss in a
> separate bug.
> 
> If needed, I can split the patch into unit test and non-unit test contributions.
> 
> Patch does not include a fix from 318268 which fixes a test failure.
> 
> I currently get null errors and time outs when running AllBugzillaTests from
> unmodified head so I have not yet been able to do a full test run to look for
> regressions.

The test repos should now work.

Please can you externalize the Strings in BugzillaRepositorySettingPage and add an tooltip text to the new Label (see defaultPlatformLabel) that show that we need Bugziilla > 3.6 for this.
Comment 11 Charley Wang CLA 2010-07-09 17:21:39 EDT
Created attachment 173924 [details]
Allow Mylyn to use xmlrpc transitions

I made the changes and ran the tests. The tests run without error :)

Please let me know if there are other things that need changing, particularly in the UI. I will do more testing this weekend if possible.
Comment 12 Charley Wang CLA 2010-07-09 17:21:41 EDT
Created attachment 173925 [details]
mylyn/context/zip
Comment 13 Frank Becker CLA 2010-07-10 11:45:05 EDT
(In reply to comment #11)
> Created an attachment (id=173924)
> Allow Mylyn to use xmlrpc transitions
> 
> I made the changes and ran the tests. The tests run without error :)
> 
> Please let me know if there are other things that need changing, particularly in
> the UI. I will do more testing this weekend if possible.

Charley,

can you please split the patch in two parts (<250 lines)
 * junit Test
 * bugzilla.core and bugzilla.ui
 
 If this is not possible we need an QC.
Comment 14 Charley Wang CLA 2010-07-12 10:37:27 EDT
Created attachment 174028 [details]
Create xmlrpc configuration

Here is the core/ui component of the patch. Let me know if there any UI elements you would like to see changed.
Comment 15 Charley Wang CLA 2010-07-12 10:37:30 EDT
Created attachment 174029 [details]
mylyn/context/zip
Comment 16 Charley Wang CLA 2010-07-12 10:40:20 EDT
Created attachment 174031 [details]
Tests for 311966

Adds additional test to Mylyn XMLRpc test that verifies the xmlrpc parsing capabilities of the CustomTransitionManager.
Comment 17 Charley Wang CLA 2010-07-12 10:40:22 EDT
Created attachment 174032 [details]
mylyn/context/zip
Comment 18 Frank Becker CLA 2010-07-12 16:43:02 EDT
(In reply to comment #14)
> Created an attachment (id=174028)
> Create xmlrpc configuration
> 
> Here is the core/ui component of the patch. Let me know if there any UI elements
> you would like to see changed.
(In reply to comment #16)
> Created an attachment (id=174031)
> Tests for 311966
> 
> Adds additional test to Mylyn XMLRpc test that verifies the xmlrpc parsing
> capabilities of the CustomTransitionManager.

The patches are now in HEAD.
Comment 19 Frank Becker CLA 2010-08-12 14:10:15 EDT
Charley,

if you think there  is something open, please reopen this bug.