Is there a way to convert the value of a Jira Service Desk custom field that is a single select field to text in scriptrunner?
Example: custom field called PagerEmailID has predefined list of emails in it.
As users open new issues they will select an emailID from a drop-down list
PagerEmailID: aaa@xyz.com
bbb@xyz.com
ccc@xyz.com
My basic question is how to covert the PagerEmailID select list custom field to a field that is a string field - call it PagerEmailID-Text
PagerEmailID-Text is a scripted field, so that it is always current regardless of if the PagerEmailID field is updated after the Issue is opened.
---
My full use case is I have post-function in a workflow to send out a custom email, and the TO: address will use the PagerEmailID-Text field, since the custom email function can not use a single select type field for the TO: address and I can't hardcode the email address
So, If I can find a way to convert PagerEmailID (single select field) to PagerEmailID-Text (String field) I've got the rest of the custom email process worked out.
Any suggestions would be appreciated, i found posts on how to convert Text/String field to Single select field, but not the other way around.