Hi,
I am trying to get a custom text field value into the "Email template" of "Send a custom email" script listener.
I tried many options that includes the following:
$cfValues['Custom Field Name']
$event.issue.getCustomFieldValue('customfield_11111')
$issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("Custom Field Name"))
Email Template:
----------------------
Hello $event.issue.getCustomFieldValue('customfield_11111')
We have received your request for $issue.summary.
The reference number for this request is $issue.
Regards,
--------------------------------
Thanks for your time and help.
--John
Hey @John Dorapalli
It should be something like this. What type of custom field is it?
$issue.getCustomFieldValue('customfield_####')
Actually it's something like this.
Custom message here: <% out <<issue.getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Custom Field Name")
) %>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Brittany,
Thank you for your quick response.
I tried that and it is not working.
$issue.getCustomFieldValue('customfield_11420')
It is a simple text custom field.
--John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @John Dorapalli try the second one I posted. Sorry for the confusion. But the second one should definitely work, just replace the custom field name with the name of your custom field name.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bingo. The 2nd option works.
Thanks a lot @Brittany Wispell.
I remember trying that option but I tried it without the "out" statement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome! Glad it worked! Have a great remainder of your day. :) If you could please accept this answer as a solution that would be greatly appreciated. It is the check mark next to the vote button :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.