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


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

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 for the three separate JavaDocs. 

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Feb 15, 2018 in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

1,175 views 6 19
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot