I would like to add a customfield_12555 into a jira issue when a condition matches. But it only works if a ticket is created with it. The type of issue what I'm creating, doesn't have #{Tracking} (customfield_12555) field by default. I don't want to change the background config for this (messing with screens, fields or schemes etc)
So when a ticket is created with #{Tracking} by default, I'm able to pass the condition. For eg:
if (contains(reporter, "jira_api_admin") and contains(labels, "Tracking-importer")) {
#{Tracking} = "black";
} else {
return false;
}When it is not present in the ticket at all, I want it to add it and give it a value.
How do I do it? This is the first time I'm coming across this issue as whatever I'm working on, it only creates the ticket with only necessary fields.
I also tried using customfield_12555 instead of #{Tracking}, didn't work.
if (contains(reporter, "jira_api_admin") and contains(labels, "Tracking-importer")) {
customfield_12555 = "black";
} else {
return false;
}
To test if my condition is working, I added addComment function and it works perfectly fine.
Any help would be appreciated.
EDIT: This is added as a SIL listener, targeting "Issue Created" for a specific project.
Thanks,
Arun.