Forums

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

Post Function (Create Issue) - How can I get Issue Key

JINWON CHOI January 26, 2021

I need to know issue key when I create issue but it is null at that time. 

 

As I know that Post Function means action after transition, but when I use at "Create Issue" transition, how can I get issuekey?

 

please give me a hand anybody

 

 

1 answer

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
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.
January 26, 2021

Post-functions are not "after a transition", they are the last set of things executed as a transition runs, they are very much part of a transition.

No, it's too early to have one in the post-functions of a create process.  You can't know it until the issue has been created, and it won't be until after the "create issue initially".  When you are running post-functions, they run in the context of the issue that was set before the issue was created, when you don't know the issue key.  If you look at the default post-functions, you'll see indexing and event firing post-functions which do not work off the issue key (because they don't have one).  You could try to replicate how they identify the issue.

I would suggest using a listener instead - the "issue created" event will point to the newly created issue which will, by then, have a key.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.7.1
TAGS
AUG Leaders

Atlassian Community Events