How to fetch the latest sub-version committed tag from Jira/fisheye?

Manjunatha K R August 9, 2016

Hi,

I have one requirement in Jira Issue to fetch "latest sub-version commit tag(i,e example KG_P_08_001_00) created in SVN" from the repository configured in Jira/Fisheye in my workflow post function and fill the Jira issue custom field(i,e Released load tag) and transition the Jira issue to next destination step.

Please advice in Jira, how to fetch the latest sub-version committed tag from fisheye installed in my JIRA server?

- Manju

1 answer

0 votes
Jonny Carter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 17, 2016

Pretty sure that you'd need to use the Fisheye REST API to get the latest changeset for a given repository. There's a couple of ways you might go about accessing it in a post function.

One is to use the Groovy HTTPBuilder library. It does a lot of things for you automatically, like parsing XML responses. The main problem you'll likely run into is authentication. HTTPBuilder won't, by itself, know the credentials you want to use to access Fisheye. You'll either have to put them directly in your script (a potential security issue), or find some way to grab them from the environment. Also, if the request takes a long time to complete, your users may notice their workflow transitions slowing down.

An alternative way is to use the Application Link API. It will help you handle things like Authentication, though I can't find a current tutorial. This one was for JIRA 5, though I'm pretty sure a lot of the application links classes are largely the same, they're just separated out into their own plugin. See https://developer.atlassian.com/docs/atlassian-platform-common-components/application-links for the three separate JavaDocs. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events