How to set current user in custom field in my WorkFlow Post Function

Arnaud Trotignon November 6, 2013

Hi,

I'm using OnDemand, and I created a specific kanban workflow :

BackLog >> ToDo >> InProgress >> WaitingForValidation >> Done

We have to manage the user who validate each issues : so I created a custom user picker Field 'Validator'.

And we want this field to be automatically set when dropping issue to 'Validated' with the current user : Who drop the issue.

I tried to create a post function in the transition 'WaitingForValidation' >> 'Done', but I didn't get the good result.

I thought I could do this with the 'Set field value from User Property value' post function, but impossible to get the list of the 'user properties' that are available.

Somebody can help me ?

Thanks for your time !

3 answers

1 accepted

4 votes
Answer accepted
Arnaud Trotignon November 6, 2013

Thanks peter !

I just found this way, but I couldn't see it before : it comes with the 'JIRA Suite Utilities', wich IS NOT activated by default.

It add a lot of Post Function features, and especially that one 'Update Issue Custom Field' wich can be filled by %%CURRENT_USER%%

regards

Dan Michaelis November 26, 2018

Peter/Arnaud,

I'm not able to get this functionality to work the way I think it's supposed to; when the workflow executes the post-function, I get the literal string %%CURRENT_USER%% rather than the substituted value.  Am I missing something obvious to enable, or is this a problem with my installation?

 

I'm using the cloud solution rather than a hosted one; I'm hoping that this works in both scenarios.  If you could let me know if you've hit this issue or something similar, and even better... If you could let me know how to resolve this, I'd greatly appreciate it.

 

Thanks!

Like Paul A likes this
0 votes
Natasha Gaffer January 2, 2015

Is there a way to Update Issue Custom Field to %%CURRENT_USER%% only if the field is null?

I tried using *Set Field Value to constant or Groovy expression* but I can't figure out how to write a groovy expression to return the current user.

Jose Pacheco July 9, 2015

Ever get it working?

Nick Norton September 8, 2015

+1

GRFN November 9, 2015

Groovy expressions are not allowed with JIRA OnDemand / Cloud

0 votes
Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 6, 2013

Hi Arnaud,

You'll need to use the following post function :

Update Issue Custom Field

Best regards,

Peter

Suggest an answer

Log in or Sign up to answer