Escalation Services

Krishnanand Nayak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 15, 2018

We are using the Escalation service for to add a comment on Bugs when a certain JQL condition is satisfied.

In the comment we want to Tag the assignee. How do we do that. Here is the current code:

issueInputParameters.setComment('${issue.assignee} : This issue is In Test for more than 5 days. Please update or provide explanation regarding the blocker.')

1 answer

1 accepted

1 vote
Answer accepted
Aidan Derossett _Adaptavist_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 15, 2018

Hey there Krishnanand!

I've been playing around with this and I think you only need to change your code slightly. Since JIRA uses Markdown with its commenting format, you need to use the Markdown syntax for tagging a user. You can do this using square brackets and a tilde:

[~username]

So, you just need to replicate this in the comment that you add:

issueInputParameters.setComment("[~${issue.assignee.name}] : This issue is In Test for more than 5 days. Please update or provide explanation regarding the blocker.")

This works on my end, but test it out on your instance and see if that does the trick. :D

Best,
Aidan

Krishnanand Nayak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 16, 2018

It didnt work.

2018-11-16_5-48-02.png

Aidan Derossett _Adaptavist_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 16, 2018

Oop! Sorry, I forgot to mention that you'll need to change the quotation marks that you're using from single to double quotes. You are only able to use string interpolation ($) inside of a double-quoted string in Groovy.

Did you directly copy and paste the example that I provided, or did you edit your to match, keeping the single-quotes you originally had? If you still have single-quotes, try out the change and see if that works better for you. :D

Suggest an answer

Log in or Sign up to answer