| Summary: | custom transitions should not require a workflow description file | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Severin Gehwolf <sgehwolf> | ||||||||
| Component: | Mylyn | Assignee: | Frank Becker <eclipse> | ||||||||
| Status: | ASSIGNED --- | QA Contact: | |||||||||
| Severity: | enhancement | ||||||||||
| Priority: | P3 | CC: | eclipse, overholt, robert.elves, sgehwolf, steffen.pingel | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Bug Depends on: | |||||||||||
| Bug Blocks: | 359210 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Severin Gehwolf
Frank, what are the requirements of obtaining the custom workflow configuration through XML-RPC? There are two ways how to use custom workflows. 1) Bugzilla > 3.6 with xmlrpc installed you can enable the "Autodetect workflow:" by setting the checkbox of "Use xmlrpc.cgi" 2) use the "Workflow description file" ../config.cgi?ctype=rdf did not include the needed informations. We can extract the defined status definitions but the status transitions are not in the rdf file. For the default workflow it is possible to define an workflow description file but you need to ad your own status fields or your changes in the default workflow. (In reply to comment #2) > There are two ways how to use custom workflows. Thanks for the details, Frank. > 1) Bugzilla > 3.6 with xmlrpc installed > you can enable the "Autodetect workflow:" by setting the checkbox of "Use > xmlrpc.cgi" Can we make this the default option and fall back if we can't find it? I'm wondering how we can guide people to the right workflow description file automatically. Without it, sites with customizations won't work out of the box. Is there a way that at a minimum we can detect that customizations exist and say "click here to search for it" or "the URL of the file is probably <this>"? +1 for doing this type of automating the detecting for workflow configurations. As a start we could check for a workflow file at a standard location during validation. (In reply to comment #4) > +1 for doing this type of automating the detecting for workflow configurations. > As a start we could check for a workflow file at a standard location during > validation. +1 for checking a standard location for a workflow description file. Also, I'm all for making the setup of custom workflows easier in Mylyn :) (In reply to comment #5) > (In reply to comment #4) > > +1 for doing this type of automating the detecting for workflow > configurations. > > As a start we could check for a workflow file at a standard location during > > validation. > > +1 for checking a standard location for a workflow description file. Also, I'm > all for making the setup of custom workflows easier in Mylyn :) For Bugzilla >= 3.6.0 with xmlrpc enabled you can use the "Use xmlrpc.cgi" checkbox in the "Additional Settings" of the Properties. In this case we do not need the workflow description file. I create a patch for download the workflow description file from an standard location. But then the Administrator need to create the file for you. Created attachment 193935 [details]
patch V1
committed patch.
the the download file should be at <Bugzilla_URL>/xml_transition_file.mylyn
where xml_transition_file.mylyn is in the same dir as xmlrpc.cgi
Created attachment 193936 [details]
mylyn/context/zip
(In reply to comment #6) > (In reply to comment #5) > > (In reply to comment #4) > > > +1 for doing this type of automating the detecting for workflow > > configurations. > > > As a start we could check for a workflow file at a standard location during > > > validation. > > > > +1 for checking a standard location for a workflow description file. Also, I'm > > all for making the setup of custom workflows easier in Mylyn :) > > For Bugzilla >= 3.6.0 with xmlrpc enabled you can use the "Use xmlrpc.cgi" > checkbox in the "Additional Settings" of the Properties. In this case we do not > need the workflow description file. I'm afraid, but that option does not work for me and Red Hat Bugzilla (which is >= 3.6.0). I'm getting a NPE once I click on "Finish" when creating a new task repository. See attached screenshot. > I create a patch for download the workflow description file from an standard > location. But then the Administrator need to create the file for you. Downloading it from a standard location is good too, but a first step in the right direction IMO would be to look at a standard location on the user-installed system. That could be <bundle-path>/bugtracker-url/custom-transitions.txt or something similar. I think <bundle-path>/<bugtracker-url>-custom-transitions.txt would do too. Then the precedence rules would be as follows: 1. Attempt to use the file the user specifies (that's equivalent to the current situation) 2. Attempt to use a file corresponding to <bundle-path>/<bugtracker-url>/custom-transitions.txt 3. Attempt to download the custom transitions file from the server. 4. If 1-3 fails, there's nothing much we can do, so do whatever is done now. That way, packagers could ship a default/fallback transition file with their Mylyn package and the user would not have to do anything other than the usual Mylyn task repository config. Custom transitions would be picked up out of the box. It still allows the user to overrule default transitions, by providing a path to the file they want to use instead. How does that sound? Created attachment 194193 [details] NPE when trying to use XMLRPC for https://bugzilla.redhat.com (In reply to comment #9) > (In reply to comment #6) . . . > > For Bugzilla >= 3.6.0 with xmlrpc enabled you can use the "Use xmlrpc.cgi" > > checkbox in the "Additional Settings" of the Properties. In this case we do not > > need the workflow description file. > > I'm afraid, but that option does not work for me and Red Hat Bugzilla (which is > >= 3.6.0). I'm getting a NPE once I click on "Finish" when creating a new task > repository. > > See attached screenshot. Sorry I can not reproduce this. I use anonymous and my userid with https://bugzilla.redhat.com What version of mylyn did you use. I did my tests with the HEAD version? > > > I create a patch for download the workflow description file from an standard > > location. But then the Administrator need to create the file for you. > > Downloading it from a standard location is good too, but a first step in the > right direction IMO would be to look at a standard location on the > user-installed system. That could be > <bundle-path>/bugtracker-url/custom-transitions.txt or something similar. I > think <bundle-path>/<bugtracker-url>-custom-transitions.txt would do too. Then > the precedence rules would be as follows: What is <bundle-path> and how do you get the custom-transitions.txt to this place? I think we should use the <extension point="org.eclipse.mylyn.tasks.core.templates"> for setting the location. Thoughts? (In reply to comment #11) > (In reply to comment #9) > > (In reply to comment #6) > > > > For Bugzilla >= 3.6.0 with xmlrpc enabled you can use the "Use xmlrpc.cgi" > > > checkbox in the "Additional Settings" of the Properties. In this case we do not > > > need the workflow description file. > > > > I'm afraid, but that option does not work for me and Red Hat Bugzilla (which is > > >= 3.6.0). I'm getting a NPE once I click on "Finish" when creating a new task > > repository. > > > > See attached screenshot. > > Sorry I can not reproduce this. I use anonymous and my userid with > https://bugzilla.redhat.com > > What version of mylyn did you use. I did my tests with the HEAD version? At the moment I'm using 3.5.1, which I've packaged for Fedora. I need to dig a little deeper. Maybe there is a problem with our packaged version only. Thanks, though. I'll follow up, should I find anything relevant for upstream Mylyn. > > > I create a patch for download the workflow description file from an standard > > > location. But then the Administrator need to create the file for you. > > > > Downloading it from a standard location is good too, but a first step in the > > right direction IMO would be to look at a standard location on the > > user-installed system. That could be > > <bundle-path>/bugtracker-url/custom-transitions.txt or something similar. I > > think <bundle-path>/<bugtracker-url>-custom-transitions.txt would do too. Then > > the precedence rules would be as follows: > > What is <bundle-path> and how do you get the custom-transitions.txt to this > place? <bundle-path> is the path to the installed bundle. Something like: String transitionFilepath = null; URL url = FileLocator.find(Platform.getBundle(BugzillaCorePlugin.ID_PLUGIN), new Path(getBugTrackerURLFromConfig() + TRANSITION_FILE_NAME), null); if (url != null) { try { transitionFilepath = FileLocator.toFileURL(url).getPath(); } catch (IOException e) { } // ignore } // try to use file at transitionFilepath > How do you get the custom-transitions.txt to this place? Linux distributions usually build everything from source. So in case of Fedora, we grab the mylyn sources and build them in a controlled environment. Hence, we can patch sources in order for the transition file to be there. It was just an idea, maybe it would be simpler to check some standard location in System.getProperty("user.home") + .mylyn/<bugtracker_url>/custom_transitions.txt. > I think we should use the <extension > point="org.eclipse.mylyn.tasks.core.templates"> for setting the location. > > Thoughts? +1 for that idea. I've just opened a bug regarding this yesterday: see bug 344032. I think it would be good to have both options, though. (In reply to comment #12) > (In reply to comment #11) > > (In reply to comment #9) > > > (In reply to comment #6) > > > > > > For Bugzilla >= 3.6.0 with xmlrpc enabled you can use the "Use xmlrpc.cgi" > > > > checkbox in the "Additional Settings" of the Properties. In this case we do not > > > > need the workflow description file. > > > > > > I'm afraid, but that option does not work for me and Red Hat Bugzilla (which is > > > >= 3.6.0). I'm getting a NPE once I click on "Finish" when creating a new task > > > repository. > > > > > > See attached screenshot. > > > > Sorry I can not reproduce this. I use anonymous and my userid with > > https://bugzilla.redhat.com > > > > What version of mylyn did you use. I did my tests with the HEAD version? > > At the moment I'm using 3.5.1, which I've packaged for Fedora. I need to dig a > little deeper. Maybe there is a problem with our packaged version only. Thanks, > though. I'll follow up, should I find anything relevant for upstream Mylyn. I've created bug 344382 to track this seperately. Thanks. Thanks for the good discussion on this bug. We should have a general policy how to name configuration files that specify task repository configuration details and have a common order for lookup. Rob, can you provide input how this has been done for other connectors (e.g. OSLC)? I'll also put this on the agenda for tomorrow's call to gather more input. *** Bug 319295 has been marked as a duplicate of this bug. *** What is the status of this bug? |