How to unlink the source tab details from a JIRA ticket

In our production environment, there is a integration between STASH and JIRA. When a user wants to commit source code, he has to mandatorily enter a JIRA ticket so that the source files committed will be captured in source tab of a JIRA ticket. This is enforced through a plugin in STASH.

If a user enters a wrong JIRA ticket during commit, source details gets captured in a wrong JIRA ticket. From GIT perspective, the wrong JIRA ticket can be corrected. However, How to unlink the source details captured in a wrong JIRA ticket? Please advise.

Let me know you need any further details from my end.

Thanks

1 answer

1 accepted

1 vote

Hi Shravanakumar,

When you rebase to fix the issue keys in the commit messages, git merely creates new commits, the old ones are only removed when git does a garbage-collection and prunes unreferenced commits.

Stash manages garbage collection of your git repo (in order to make forks and cross-repo pull-requests work) and is not allowing the pruning of your commits that you presumably rebased to fix the issue key.

So in JIRA, on the incorrect issue, you are seeing links to the old commits (if you click through, you'll probably see that they are not on any branches).

If you look at the correct issue, you'll see links to the corrected commits.

Unfortunately, there is currently no way to force removal of the older commits.

For more information, you can browse various issues about garbage collection in stash https://jira.atlassian.com/issues/?jql=project%20%3D%20STASH%20AND%20text%20~%20%22garbage%20collect%22

Matt

Thanks Matthew. Your link does not seem to working or does not shows any issues. Could you please verify the link once again ? Thanks

Try going to here: https://jira.atlassian.com/issues/?jql=key%20in%20watchedIssues()

then enter this into the search box: project=stash AND text ~'garbage collect'

Or see if this link works better:

https://jira.atlassian.com/issues/?jql=project%3Dstash%20AND%20text%20~%27garbage%20collect%27

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

387 views 1 18
Join discussion

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