Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Link commit to issue from within Stash

Jean Risse July 9, 2013

The question of whether it's possible to link issues to commits after the commit was done, has been raised more than once here. But it's not likely that this will be implemented any time soon.

That's why we want to develop a plugin(?) to do this. The preferred user scenario would be that a (filtered) list of issues is made available from within a commit page in Stash. From there, multiple issues can be selected to be linked to the current commit. The link itself will be based on the hash key.

Before digging into the API documentation of Jira and Stash ourselves, I got 2 questions that might be answered here by anyone who has already got some knowledge and experience developing for Jira and/or Stash:

  1. Is it feasible at all to implement such a user scenario? Or do the Jira and Stash APIs impose limits that can't be overcome?
  2. Is Stash the right choice for implementing this feature? Or are there any better alternatives?

Thanks for helping out to get this started. Any comments or suggestions are most welcome.

Cheers,

Jean

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
cofarrell
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.
July 13, 2013

Hi Jean,

Sorry for the delay.

1. It's definitely feasible. The solution would look something like a client-web-fragment ('stash.changeset.extras'), that connects to JIRA using their REST API and returns the relevant information. You could then store the details in Active Objects and/or in Git (see below). Displaying the final result could be done in your web-fragment and optionally an extra column on the commits table ('stash.commits.extra' web section). Note that it with this approach it wouldn't be exactly seamless with our current JIRA issue linking.

2. That's a more open-ended question. I think linking the information in Stash is certainly a reasonable approach. The only thing to think about is where you want the information to be stored. Obviously if you persist the data in Stash you won't be able to query that locally, and so optionally storing the details as Git notes might be something to consider.

Finally, I do believe that we have plans to support some form of post-commit linking, but I couldn't comment on any dates or details (because I don't know). I see you've commented on the relevant issue, which is what I was going to recommend. We will certainly try to post more details as our plans become more concrete.

I hope this answers your question somewhat.

Charles

Jean Risse July 14, 2013

Thanks very much Charles. This should give us some headstart. (but I still hope Atlassian finishes its version before we do ;-) )

Jean

TAGS
AUG Leaders

Atlassian Community Events