Say I have an issue, "As a Jira & Stash user, I want to be able to update Jira issues with time spent when committing changes using git." This is issue SAU-34 as part of the Sunshine and Unicorns project.
If I perform some work and have a git repository with changes staged for a commit, I might commit with this message:
git commit -m "Recognising limited 'work spent' formats in git commits as part of SAU-34."
At present, the linkage is in place between the Jira issue SAU-34 (through the Source messages at the bottom of the issue details page) and Stash (though the automatic link generated on recognition of SAU-34 as an issue identifier).
Is there a possibility to enhance this linkage such that a commit of the form:
git commit -m "Recognising limited 'work spent' formats in git commits as part of SAU-34. Effort: 3h 25m."
Would not only provide linkage between Stash and Jira, but would also update Jira issue SAU-34 with 3:25 of effort, by default reducing the remaining estimate by the same amount of time?
I've tried searching through these answer/questions for terms such as work, effort, jira, stash, but either the issue hasn't been raised before or my Atlassian-Question-Fu is weak.
I have found one option here (the Smart Commits mentioned in Charles O'Farrell's message, which implements the functionality used by Christian Gagneraud's suggestion): https://confluence.atlassian.com/display/AOD/Processing+JIRA+issues+with+commit+messages
Another option is to use a local commit hook in combination with Bob Swift's Jira CLI: https://bobswift.atlassian.net/wiki/display/JCLIP/CLI+Plugin+for+JIRA
Using the Jira CLI + local commit hook avoids the issues mentioned by Charles O'Farrell, but does require access to Jira at the time the commit is made (thus you cannot include work effort in commits made while offline).
Hi Alex,
I think you're looking for 'smart commits':
https://jira.atlassian.com/browse/STASH-2490
I'm not going to lie though - it's not something we're very interested in implementing at the moment. The reasons are due to the nature of Git and DVCS. For example. If you push to a fork repository, with a commit that contains your commit message, and then you merge to the parent repository, would you want the time to update again? Or delete the branch and then re-create it? What happens if you delete the repository or migrate to another Stash instance? It's a tricky problem to solve, and one that we would prefer to tackle with stronger/smarter integration with JIRA.
That said I suspect someone will inevitably implement it as a plugin, and I recommend watching the issue above for news and updates.
Cheers,
Charles
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Christian seems to be referencing the DVCS plugin. See
https://confluence.atlassian.com/display/AOD/Processing+JIRA+issues+with+commit+messages
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I'm not wrong, you can do it this way:
git commit -m "SAU-34 #time 3h 25m Blah Blah Blah "
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This doesn't appear to be working for our Stash/Jira installation. Any idea what add-ons, plugins or configuration you have that might be enabling this functionality?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.