Hi,
I have a piece of code on Scriptrunner post function Jira workflow;
if (elite.status == 201) {
final customfieldID = 'customfield_10289'
final newFieldValue = 'Success'
put("/rest/api/2/issue/ITS-53")
.header('Content-Type', 'application/json')
.body([
fields: [
(customfieldID): newFieldValue
]
]).asString()
} else {
final customfieldID = 'customfield_10289'
final newFieldValue = 'Fail'
put("/rest/api/2/issue/ITS-53")
.header('Content-Type', 'application/json')
.body([
fields: [
(customfieldID): newFieldValue
]
]).asString()
}
I want to define the issue key (ITS-53) as the current issue key that I run when I transition the current issue key and so the post function (scriptrunner) works.
how to replace the hardcoded issue key to the current issue key?
Thanks