I am using Jira cloud with script runner. I'm able to fetch a certain issue by hardcoding the issue key, however I want this to be dynamic by using the current issue that triggers my post-function:
def issueKey = 'WS-456'
def issue = get("/rest/api/2/issue/${issueKey}")
.header('Content-Type', 'application/json')
.asObject(Map)
.body
I want 'WS-456' to be dynamic please
Hi @[deleted]
Add this on top of your code.
def issueKey = issue.key
I hope it helps.
Ravi
Hello,
Thanks for your response - unfortunately I have tried this and it is not working.
Maya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @[deleted]
In that case I suggest raise a support request so someone cane take a look at it.
All other scripts are working?
Ravi
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.