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

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

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
Community showcase
Asked Thursday in Jira Ops

I'm John Allspaw, Ask Me Anything about incident analysis and postmortems

I'm John Allspaw, co-founder of   Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...

5,475 views 21 17
View question

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