Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Empty ${issue.key}

Александр Сивцов February 1, 2019

Hello!

I'm created webhook with params:

  • Issue link
    created (issuelink_created)
  • URL: http://my-site/script.php?key=${issue.key}

When webhook works (create related task), i get empty 'key' param value in nginx logs. Where is the mistake?

my-site "POST /script.php?key&user_id=alexander&user_key=alexander HTTP/1.1" 200 124 "-" "Atlassian HttpClient unknown


 Thanks

1 answer

1 accepted

1 vote
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 5, 2019

I suspect that this is being fired off in a post-function of a workflow.  When you're using these post functions in the create transition, then order in which these post functions appear is really important.

This is noted in the documentation in Advanced workflow configuration: Using post functions with the initial transition.

Notes

If you need to set the 'Resolution' field when creating an issue, add the 'Update Issue Field' post function after the 'Create the issue' post function

Granted that is for setting a resolution value on an issue, but the same idea applies.  What I think is happening in your case is that Jira is firing off the webhook before the issue has actually been saved and given an issuekey.  Hence there is no value to be passed to the webhook at that time.

You should be able to get past this problem just by editing the workflow and having the webhook event fire last in the transition, then publish that workflow.

Александр Сивцов February 5, 2019

@Andy Heinzer, thanks for help! The task remains in one state. Your solution should help if the task changes its status... 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events