Hello All,
I was able to get custom field(text) value with the below script in custom email script runner in workflow transition post function.
Custom message here: <% out <<issue.getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Custom Field Name")
) %>
Output is as below:
Custom message here: Test123
But i want to replace Custom message here with custom field name.
Ex - Custom field Name: Test123
Is it possible? Please help.
Thanks in advance,
Manikanta
Hi mani@123
Sorry if I did not understand clearly, but you're already using hard coded custom field name.
com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Custom Field Name")
Here, Custom Field Name is the name of the custom field.
Anyway below code gives you the name of the custom field.
com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Custom Field Name").getName()
You can also get custom field name by custom field ID
com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_10xxx").getName()
where customfield_10xxx is the ID of the custom field.
I hope I was clear.
Cheers
Tuncay
Try putting the text within <b> tags.
<b>bold text</b>
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.
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.