It seems when we use a customfield name which is duplicated then the script is only checking the customfield with the lowest customfield ID. Previously it used to check any customfiled which was available to the context of the project. We noticed the problem since we upgraded to JIRA 6.4.9 on the Script runner 3.1.4.
I know one option is obviously to rename and merge the customfields but what or our other options. Can we use a customfield ID to get the value?
We currently use the below to check the value of a select list.
cfValues['Severity']?.value == 'Sev 1'
this also works:
But this doesn't work:
cfValues['customfield_11760']?.value == 'Sev 1'
This is a workflow function?
cfValues is populated only from the fields associated with the issue. Are you sure that both Severity fields are not associated with the issue, even if only one happens to be on the screen?
> We noticed the problem since we upgraded to JIRA 6.4.9 on the Script runner 3.1.4.
What version were you on previously?
Hi Jamie, Thanks for getting back. Yes this is a wokflow post-function to fast transition an issue based on the condition. Only one severity field is associated to the project we are using and on the screen. This was working fine and simply stopped working since the upgrade. Previously we were on JIRA 6.1.7 and script runner 2.1.16. Thanks, Gaj PS. I see the condition checker has been removed from your plugin. However the preview of a condition to see if it works on an issue is only available when testing the send custom email function. Is there an ability test a condition for an issue another way? The standalone condition checker was very handy before. :-) .
The condition is not being evaluated now. It script always comes with false for the check on Severity. I've tried renaming the duplicate customfield names on our QA and it works. Like I said the problem has only occurred after the upgrade. I've also confirmed that the other duplicate severity fields are not available to the context of the project we are testing. We have another customfield which is also duplicated in the name but that works fine and I'm guessing the reason for this is that customfield has a lower customfield id.
Hi Jamie, Even we are facing the same issue wherein if there are multiple custom fields of the same names but different types like "single select", "checkbox" . It throws warning - "Could not look up the type for this custom field, so we can't check this code. Possible the field doesn't exist, or multiple exist for this name"
Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG