I am using following Groovy expression post function to get a priority value and set it to a custom field during a issue creation.
if(issue.get("priority").getName() == "Minor" || issue.get("priority").getName() == "Trivial")
{ return "Low Priority"; } else { return "TBD"; }
The above groovy expression post function is working for issue created manually, but it is not working if a issue created via Remedy.
How do I extend above groovy expression to check that, priority value has changed during a issue creation via Remedy. (Please see the attached)
Cheers,
Ganga
image2016-5-25 15:19:24.png
Hi @Ganga Selvarajah
please move your post-function (3. Creates the issue originally.) on first place and check
Did you check your logs (atlassian-jira.log) for errors or warnings right after creating the issue from Remedy?
You can also add some logging to your script using the log object to find out what the priority field contains when the post-function runs:
log.error("Priority is: "+issue.get("priority").getName());
Also, make sure the priority field is not simply empty (null) at the beginning of your script:
if (issue.get("priority")==null) { log.error("Priority field is empty"); return; }
Hi David,
Thanks a lot your suggestion.
The priority field always has a value (default is = Major). Via remedy interface we're getting priority value. it is get updated correctly for a newly created issues, but set value Groovy expression post function is taking a default value (Major) instated changed value.
how do I get the changed value?
I have no idea how Remedy updates that value and when, so I cannot help you unless you elaborate.
a log information will it help you to see the issue?
here is the screenshot of the issue history tab. The values comes from Remedy (Region, Priority & Case Id)
image2016-5-26 10:58:44.png
Thanks, sorry for the late response.
I tried, but no luck....
It works perfectly after move Transaction Issue post function to the end of the list.
Thanks a lot for your time for me to resolve this issue. I believe lots other users definitely get benefits from your answer.
It looks like you're new here. Sign in or register to get started.