In the Subject section of the "Send a custom email" script, I have entered:
My Company Name | $issue.key has been processed | Resolution: $issue.resolution
The result is:
[JIRA] The Silent Partner | FPS-1 has been processed | Resolution: [id:10600, description:, sequence:35, name:Interested, iconurl:null]
My question is: I only want the resolution after "Resolution:". For example, I want it to look like this:
[JIRA] The Silent Partner | FPS-1 has been processed | Resolution: Interested
am I able to do this and how would I acheive this?
Thanks
Frank
Hi Frank,
In order to get only the name of the resolution use
$issue.resolution?.name - for a post function this will not work use <%=issue.resolution?.name %> instead
regards
Thanks Thanon,
I have tested this but it does not seem to work. The result is:
Re: [JIRA] The Silent Partner | FPS-1 has been processed | Resolution: [id:10600, description:, sequence:35, name:Interested, iconurl:null]?.name
Any thoughts?
Thanks
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you try wrap the expression in curly braces? ${issue.resolution?.name}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes, think it should be "wrapped" in curly braces, thanks Jozef.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Jozef,
I have done that and the result is:
When I test in the workflow using the preview button, I get:
The Silent Partner | FPS-1 has been processed | Resolution: Interested
when I test by activating the workflow and sending an email I get:
[JIRA] The Silent Partner | FPS-1 has been processed | Resolution:
In other words, its dropping the value of the resolution, which should be "Interested".
Any thoughts?
Thanks
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Note that I have applied ${issue.resolution?.name} into both the subject and the body. The value is dropped in both instances
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Frank,
Try to use
Resolution : <%=issue.resolution?.name %>
I will also update my original answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can't use this syntax ( ${issue.resolution?.name}) in workflows. JIRA tries to interpolate the value of it before the plugin gets to look at the script, which just buggers everything up.
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.