Automation Plugin - How to 'mention' a user picker (single user) in an Edit Issue Action

Vikki Short March 24, 2016

I am trying to add a comment using an automation rule that will include a username 'mention' for a user picker (single user) field. However, I can only output username(username) (e.g. JSmith(jsmith)).

This is what I am entering in the Edit Fields box

{{comment = Hi $customfields.get(12345)}}

Even if I enclose it in square brackets with a tilde character e.g.

{{comment = Hi [~$customfields.get(12345)]}}

it still doesn't show as a 'mention' (it shows [~JSmith(jsmith)]).

Is there a way to output just the username (e.g. jsmith) so that enclosing it in square brackets with a tilde character will turn it into a 'mention'?

Thanks

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Damian Skrodzki April 11, 2016

I've managed to get this mention with .name suffix (following example $issue.assignee.name)

[~$customfields.get(10000).name]
Vikki Short April 11, 2016

Genius. Thanks Damian. smile I knew it would be something simple that I was missing! (Sorry for the delay in replying - the forum blocked me from adding any more comments yesterday as I don’t have enough points!)

Damian Skrodzki April 11, 2016

No problem,  your welcome wink

0 votes
Vikki Short April 10, 2016

@Damian Skrodzki - You helped me with a similar problem in your Canned Responses for JIRA plugin. Do you know if there is a way to do this in the Automation plugin, or will it require Atlassian Labs to make changes to the way user picker (single user) fields output the username?

Alternatively, do you have any plans to make Canned Responses for JIRA available from the transition post functions?

Thanks

Vikki

Damian Skrodzki April 11, 2016

It looks like this plugin just renders "plain" user as string and you need to call user.getName() to get value that should insert between mention brackets. 

Could you tell me what Edit Fields box are you talking about? Does this Automation add-on add some post functions or is there some other UI for this?

Implementing canned response post-function seems to be very good idea. I've added https://jira.spartez.com/browse/CT-283 for that. We don't have exact plans when implement this but feel free to add yourself as a watcher.

Vikki Short April 11, 2016

Hi @Damian Skrodzki

As always, thanks for your prompt response.

The Automation Plugin has its own UI. It looks like this: image2016-4-11 11:15:52.png

So I guess that means I can't make it work without Atlassian Labs making changes then?!

Thanks for creating CT-283. I'll certainly start watching it.

Thanks again

Vikki

Damian Skrodzki October 3, 2016

Just wanted to let you know that CT-283 is now resolved and you can use Canned Response as Post-workflow function wink

Cheers,
Damian

Vikki Short October 3, 2016

Great - thanks Damian

TAGS
AUG Leaders

Atlassian Community Events