Boolean expression with user array not working

Hi,

For a certain type of issue, we force specific users to enter the time spent, with this validator:

{Total time spent (minutes)} != null or %{Assignee} not in ["user1", "user2"]

So if user1 is the current user and the total time spent field is empty, it should display a warning. But it doesn't work, even if the condition should return true.

1 answer

Hi Pascal,

Sorry for a so late answer, but haven't seen your question until now, since it hasn't got the label of JIRA Workflow Toolbox add-on.

The problem with your expression is that virtual field Total time spent (minutes) always returns a numeric value, i.e., it's never null. The correct boolean expression is:

{00025} > 0 or %{00003} not in ["user1", "user2"]

Note that:

  • {00025} is field code for Total time spent (minutes)
  • %{00003} is field code for Assignee
  • user1 and user2 are user names, not to be confused with user's full names.

I inform you that there also is a virtual field for Current user which is the user that is logged and executing the transition of the workflow, which is not necessarily the Assignee. Its field code is %{00020}.

Regards,

Fidel

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,026 views 12 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot