Hi everyone,
I am trying to check whether the Request Type field is empty or not within my Jira ScriptRunner code. The field is populated on the ticket, but when I extract it using issue.fields[RequestTypeID].toString(), it is always returning null. I exported the Jira issue as an XML file and searched the customfieldID corresponding to the Request Type field within the file and no value shows up underneath the field (please see image below).
Has anyone encountered an issue similar to this in the past? Checking whether the field is null or not is essential for the functionality I am trying to implement within ScriptRunner so any help would be greatly appreciated.
Do you have multiple custom fields with the name of Request Type? If so, I assume that the customfield ID listed is correct, but it's a simple fix if that's the problem.
Hi Matt,
Thanks for responding.
There is only one custom field with the name of Request Type within the Jira ticket and within the XML file as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Matt Parks ,
I just wanted to follow up and see if you had any further suggestions to troubleshoot this issue.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have almost never used Scriptrunner on Cloud, so the code ends up being pretty different than what I write for Data Center.
But maybe, instead of getting the value of the field, you actually have to get the Option that is selected and then get the name of the selected Option? Or maybe you need to see if the Option is null?
I'm assuming that Request Type is a select field. I think you might even need to write it differently if it's a single-select as opposed to a multi-select, but I honestly don't know for sure.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.