Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

[Solved] Lookup other issues for assigned assignee

Michael de Jonge
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 1, 2024

I'm currently making my own Out of Office function. When a issue is assigned to someone i want automation to look for another issue called "Out of Office".

Currently my automation is giving errors in the lookup function. Can anyone help me with the right JQL code for this.

Naamloos.pngNaamloos1.png

1 answer

1 accepted

0 votes
Answer accepted
Hans Polder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 1, 2024

Hi @Michael de Jonge ,

Welcome to the community!

There are two errors in your automation rule:

  1. You've defined 'lookupissues.size' but it should be 'lookupIssues.size' > it at least mattered in my test setup :)
  2. You cannot use 'smart values' directly in a JQL. You need to define it as a variable first.

TIP: Use Log actions in your automation rule to see where it's failing.

Below automation works for me:

Screenshot 2024-08-01 105427.png

PS: The log actions are of course not needed once the rule is working fine, you should either leave them out, or remove them once the rule is working correctly.

Hans Polder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 1, 2024

PPS: I assume that you're either deleting the out of office tickets, or making them 'unassigned' after the person has returned from out of office > otherwise the script will always work for any past ticket as well. Or you should add some JQL logic like 'and status != Returned' to avoid past OoO's to be activating the rule.

Like Michael de Jonge likes this
Michael de Jonge
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 1, 2024

Hi Hans, thanks for you clear explanation. I already fixed the assignee wich was a problem of adding "" around the {{}}.

And thanks for the capital I in lookupIssues, that also solved a problem.

Somehow i didn't need to add all the smart values and I AM able use them directly.

The working script for now:

Naamloos.png

 

Thanks again for you help!

Like # people like this
Hans Polder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 1, 2024

Ah, cool! I learned something new today :)

Of course, all the 'add to audit log' entries were not needed, but good to know that you actually don't need to create the variable and just add the "" to make it work!

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events