Hi All,
I am trying to send the email using Script runner Send Custom Email option.
My code is as follows. I am using "Plain Text" and this sends email with HTML tags.
Environment: <% out << (issue.getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName('Environment')).toString()) %>
Description: $issue.description
Changing the Description render from JEditor to Default solves the problem. But it is not supporting service desk requests.
JIRA: 7.3.8
Scriptrunner: 5.0.11
Can somebody help me with this?
Thank you!
Hello,
Could you send an example of what email you receive and a screenshot of the settings you are using on Send Custom Email? Then I'll be able to get more context into what exactly you're doing and what might be going wrong. :)
Regards,
Jenna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you please try changing the Email format from "Plain text" to "HTML"?
I think you might be pulling in html tags from your issue description, changing this setting should let them get interpreted instead of being printed out in the email's body. To check this, you could add a logging statement to see exactly what you're getting when you call '$issue.description". Something like this -
log.debug(issue.description)
Let me know if this helps!
Regards,
Jenna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jenna Davis
Thanks for the suggestion.
Changing the Email format to HTML and some </br> notations did the job. And didn't want to change description line.
The following Production SPM has been actioned today.
</br>
Service Desk ticket: $issue.key
</br>
SPM X-Ref - Test : <% out << (issue.getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName('SPM X-Refs - Test')).toString()) %>
</br>
SPM X-Ref - Prod : <% out << (issue.getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName('SPM X-Refs - Prod')).toString()) %>
</br>
Keyed by: <% out << (issue.getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName('Keyed by')).toString()) %>
</br>
Reviewed by (Peer): <% out << (issue.getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName('Peer-Reviewer')).toString()) %>
</br>
Reviewed by (client): <% out << (issue.getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName('Reviewed by Client')).toString()) %>
</br>
To the Global Release Team: The SPM has also been applied to the following environments
</br>
Environment: <% out << (issue.getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName('Environment')).toString()) %>
</br>
Description: $issue.description
</br>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great! Glad that worked for you.
If you're satisfied with my answer could you please accept it? This helps to let others know how to fix this issue should they encounter it. :)
Also, please do let me know if you have any other questions.
Jenna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jenna Davis -- I need a favour one of my client is need to see only Active sprint for a task associated in structure. How can i achieve that. We need to see only active sprint task in stucture- this is a 3rd party add-on.
Can you help?
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.