How can I remove stale commits from JIRA tasks?

Swift Capital May 2, 2014

We have OnDemand JIRA and use BitBucket.

Occasionally, we perform a git rebase to remove incorrect commits. Especially ones that forget to add the issue tag to the commit message.

Because of this, other commits that were modified as part of the rebase show up as duplicates attached to their respective issues.

Eventually, BitBucket prunes the orphaned commits. But JIRA does not remove the links from the issues.

At this point, JIRA has commit links that show up as 404s if you click on them.

Re-indexing does not appear to resolve this.

Is there any other steps we can take to remove this clutter?

1 answer

1 accepted

3 votes
Answer accepted
aMarcus
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 4, 2014

You can hard refresh the data stored by the DVCS Connector by visiting Cog (Administration) menu -> Add-ons -> DVCS Accounts. Then Shift+Click the refresh icon next to the repository that has had data rewritten. From the dialog that appears, you can force a complete refresh.

Swift Capital May 5, 2014

Thank you for this information. Shift+Click was definately not intuitive.

Arthur Maltson April 12, 2016

It'd also be nice if JIRA (and Bamboo has this issue too) did this automatically. Thanks!

Ondrej Medek September 15, 2016

Cannot find DVCS Accounts in the JIRA Cloud admin.

Esty Heller July 11, 2017

I did this, and it half worked.

Now, in the jira dev panel, the commit count still includes the stale commits. when i click the link, i only see the current live commits (so that's an improvement), but underneath them, it says "You don't have access to view all related commits"

Yeah, that's definitely a bug! (ps i am an admin).

Mike Gelfand July 24, 2018

@aMarcusThis is not a solution but a workaround. If one's workflow is based on rebases, they'll have to perform full sync over and over again, and it'll never give them the right feeling. Rebases should be dealt with automatically.

Ondra Medek July 24, 2018

I agree with @Mike Gelfand this workaround is inconvenient and for admin users only.

What about to make an option inside the Jira task to refresh commits just for the task? This option should be accessible for all users with edit task rights.

Like Eduardo León likes this
Tavin Cole January 29, 2019

@aMarcus there is no such refresh icon in the current version of JIRA (cloud).

DaSt May 11, 2020

Any progress on this?

Like Jan Meiswinkel likes this
Jan Meiswinkel August 6, 2020

Are there any updates on this by Atlassian?

Our users are asking for this option to keep their git references on tickets clean.

@aMarcus 

Like Eduardo León likes this
ChuckieAJ
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.
December 25, 2020

Sounds like what I need. I amended the last commit and now I have two showing in the commits list for my issue in Jira.

Like Jan Meiswinkel likes this
ChuckieAJ
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.
December 25, 2020

By the way, I could not work out how to follow the steps in this answer.

Like Jan Meiswinkel likes this

Suggest an answer

Log in or Sign up to answer