We have Jira 4.3.4 running GreenHopper 5.6.8. We are using the GH Rank property to assign ranks to the issues in our sytem.
In our setup, I would like to be able to modify the GreenHopper Rank of an issue based on the rank value that is assigned to a different issue.
For example, as a side effect of changing the Rank on Issue#1 to 100, I would like to have Issue#2's rank changed to 101.
I have been looking through the API and have found a way to read the GH Rank using the Groovy script getCustomField function.
What I see in the returned rank value is not the absolute value of the Rank as seen in the GUI, but some very large number. I don't want to attempt to set the rank value because I'm not sure what relative value should be used.
So, my questions are:
1) Does anyone know how to translate the rank DB value to the value seen in the GUI?
2) Is there a better API for retrieving the Rank value?
3) Is there an API that allows us to modify the Rank value?
You can indeed ust the REST API internally to a JIRA plugin to do this but the more direct route is via the RankService. I posted some sample code for this in this answer.
Thanks,
Shaun
You can use the REST api of GH to do this. Read https://answers.atlassian.com/questions/45323/rest-api-for-ranking
If you are developing a JIRA plugin, you will have to invoke the rest method from a javascript to do it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may want to take a look at http://developers.atlassian.com where you'll find development guides that will help you on these scripts.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.