Stash and JIRA onDemand integration not linking issues

JD Estrada December 18, 2012

Based on another answer about Stash and JIRA onDemand integration (https://answers.atlassian.com/questions/57099/does-stash-integrate-with-jira-on-demand/112100) I'm led to believe that I can use an application link to associate my git repo code commits to my JIRA issues. However, after setting up Stash and creating application links both in Stash and JIRA, neither application is making an association between commits and issues.

Where is the indexing, or whatever links commits and issues, actually done?

I experienced problems with my Stash repo's commit hooks, so if that is where it should be handled, I guess my question is about getting those hooks working! Both pre and post-commit hooks give the same error (not found)

remote: hooks/post-receive.d/20_stash_callback: line 6: exec: git-post-receive: not found
remote: run-parts: hooks/post-receive.d/20_stash_callback exited with return code 127

2 answers

1 vote
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.
December 19, 2012

Hi Jd,

You should be pushing _to_ Stash, rather than via the filesystem. Sorry, the word "manually" was not a very good word for me to use.

If you have a really big repository indexing can take a while. Otherwise it might be easier to see what's going on if you could capture some debugging in the logs. At that point you might want to raise a support ticket rather than posting it here (or both).

http://support.atlassian.com/

Cheers,

Charles

1 vote
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.
December 18, 2012

Hi Jd,

I might leave the indexing question for a minute, the other is much more serious. As part of Stash 2.0 we introduced Branch Permissions which required the use of custom hooks that would enable in-application pre/post receive functionality. The script that is failing contains the following line:

exec $STASH_HOOK_CALLBACK git-post-receive "$@" <&0 >&1 2>&2

The $STASH_HOOK_CALLBACK variable is _always_ passed into the environment by Stash. Are you trying to push to the local repositories manually? That would explain the lack of that variable. Or is the error coming back from Stash?

Regarding indexing - we do it on the Stash side. Any commits that contain JIRA-style commits (ie ABC-123) will be indexed, and then when an application link to JIRA is enabled you should see an "Issues" tab when viewing commits. Is this tab now visible on your instance of Stash? If so I'm assuming commits with associated JIRA keys aren't linking correctly? The next step might be to enable debugging in Stash and push another JIRA commit so we can see if everything is working correctly.

https://confluence.atlassian.com/display/STASH/Enabling+Stash+debug+logging

Cheers,

Charles

JD Estrada December 19, 2012

Oh, I should probably mention that my goal was to use an existing code repo and push it into Stash. My pushes were indeed being done manually, so that explains the errors. What is the right way to update my repo for Stash?

The repo is working in Stash (I can see the commit history) but the "Issues" column of the repo "Commits" tab doesn't have anything in it.

Thanks, Charles!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events