I'm using scriptrunner.
I trying to add custom field value in the post funcion send email but I receive an error mesage.
look at my code.
<p> Issue ${issue.key} was created
<p> Created by: ${issue.reporter}
<p>
Custom field value: <% out << issue.getCustomFieldValue(componentManager.getCustomFieldManager()?.getCustomFieldObjectByName("Epic Link")) %>
<p>
<p>
$Description {issue.description}
Error
No such property: componentManager for class: groovy.lang.Binding
thanks!
Hey @Sergio Palacio
Try this...
Custom Field Value: <% out <<
issue.getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Epic")) %> <br>
I would also recommend using breaks instead of paragraphs.
<br>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi brittany. thanks for your suggestion I tried.
Now the error is
Error
undefined
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Custom Field Value: <% out <<
issue.getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Epic Link")) %> <br>
Did you change the Custom Field Value to "Epic Link". I forgot to change it to Epic Link in my first reply.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Error
No such property: Description for class: groovy.lang.Binding
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Replace your Description with the below.
Description: $issue.description<br><br>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here's the whole email script...
${issue.assignee?.displayName} --This is how you get the assignee and the full name if needed.
${issue.reporter?.displayName} --This displays the reporter as a full name.
<a href="$baseUrl/browse/$issue.key">${issue.key}</a> --This will provide a link to the issue within the email sent.
Description: $issue.description --This is how you get the description.
Custom Field Value <% out <<
issue.getCustomFieldValue(
com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Epic Link")
)%> <br> --This is how you get a custom field.
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.
Awesome! Glad I was able to help!
Have a great week!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I have a similar issue where I want to send an email to a specific user using a Script runner where Issue Reporter is a specific person and Issue Type = Bug or Issues. Please advice.
Thank you,
Guru
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.