How to assign CurrentUser to customfield in JIRA Automation Plugin?


i would like to write a rule which will be set customfield to value of "CurrentUser" after IssueCommented Event. (something like this -> customfield_10604=CurrentUser)

How can i make this because this return an error?

Best Regard, Jakub

5 answers

How about using $ ? Won't that work? It should expand all things in standard velocity context, see

You can write post function, after issue commented  you have to set customfield value to current user, you may look customfield and usermanager classes.


Hi, thanks for your response.

but what about "Work Logged on Issue" event? I would like to create rule in JIRA Automation Plugin when somebody "Work Log on Issue" and then rule will set customfield to value="CurrentUser".

I won`t using postfunction in workflows.


Hi Matej,

thanks for your response.

It doesn`t work.

Is it even possible to set dynamic variable in JIRA Automation Plugin rule?


You're right, I've checked the code and it doesn't provide the full Velocity context, only very limited subset - issue info (like key, summary etc) and customfield values. Due to that it's currently not possible however with a little bit of coding skills you can extend the EditIssueAction and implement this.

Ok I understand. Thank you for your help.

Hi MateJ,

We think it'd be useful if the ability to set the the currentUser() or the event author to a custom field is supported. Is it something going to be supported in the near future? 

Best regards.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

Meet the AUG leaders of Northern Virginia

@Rachel Wright (Jira Genie), @Billy Poggi (AUG NOVA, DC), and @Dana Jansen (Confluence Queen) are just some of the folks that lead one of the world's most active Atlassian User Group (AUG)....

158 views 5 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you