Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JQL syntax question

Marcus Toepper November 11, 2025

Hi all!

I am currently doing an automated mail reminder if collegues do have mulitples stories in progress. For that my automation uses a JQL, but I have a problem, my query also hits the field for additional assignees, therefore, I get to many results for the indiviual user as I only one those the colleague is the actual assignee.

In my mind, I should be able to formulate like:

asignee = xxx AND "additional assignees" NOT IN (xxx)

But this gives no results at all. 

 

additional" assignees IN (xxx)

on its own however works. Seems, I am missing something here 8(

 

Any pointers in the right direction would be much appreciated!

Kind regards,

Marcus

2 answers

1 accepted

0 votes
Answer accepted
Tuncay Senturk _Snapbytes_
Community Champion
November 11, 2025

Hi @Marcus Toepper 

Is your “Additional Assignees” field a native multi-user picker field?

If it is, then the JQL seems OK. Make sure that after running the below JQL;

"additional assignees" NOT IN (xxx)

there are issues which have assignee field value of xxx.

Marcus Toepper November 11, 2025

Hi there!

Still don't get it.


project =BBBB AND issuetype = Story AND status="In Progress" AND (assignee = 11111 OR "Weitere Bearbeiter" IN (11111))

works like expected.


project = BBBB AND issuetype = Story AND status="In Progress" AND (assignee = 11111 AND "Weitere Bearbeiter" NOT IN (11111))

however does not. Is it me? ;)

Tuncay Senturk _Snapbytes_
Community Champion
November 12, 2025

Hey @Marcus Toepper 

The JQLs do not represent the same thing.

(assignee = 11111 OR "Weitere Bearbeiter" IN (11111))

returns if the assignee is 11111 regardless of the "Weitere Bearbeiter" field's value because you're using OR and it is TRUE when either is true.

However

(assignee = 11111 AND "Weitere Bearbeiter" NOT IN (11111))

means that assigneee MUST be 11111 AND the "Weitere Bearbeiter" MUST NOT be 11111.

I hope I was clear, please let me know if I am missing anything

Marcus Toepper November 12, 2025

Thanx for discussing this with me 8) I probalby should have written some more, but I tried to keep it brief in order to be not too tiresome ;)

Long(er) version!

Given: I have one colleague, who is assignee in exactly one story and additional assignee in exactly one other story. So, expected result from query one (OR) is a count of two. Works.

If I shorten the statement to only query for the additional assignee (Weitere Bearbeiter) it also works, count is 1. This implies, that the two fields are distinct (of course)

Meaning: Both individual parts work. So the last statement should also yield a count of one -> The story, where the colleague is the actual assignee but not the one where he' just an " additional assignee" (NOT IN). But the count is still two. 

Maybe I just struggle to understand it.

Tuncay Senturk _Snapbytes_
Community Champion
November 12, 2025

Ok, thanks for the clarification

(assignee = 11111 AND "Weitere Bearbeiter" NOT IN (11111))

means “issues where the assignee is 11111 and this user is not in the Weitere Bearbeiter list”.  However, it won't return the issues which have "Weitere Bearbeiter' field as EMPTY.

So, I'd suggest using

(assignee = 11111 AND 
("Weitere Bearbeiter" IS EMPTY OR "Weitere Bearbeiter" NOT IN (11111)
)

I hope I understand it correctly and this would help :) 

Marcus Toepper November 13, 2025

Hey there!

Yes, that one works as expected! Thank you so much, really very much appreciated!

Kind regards,

Marcus

0 votes
Dick
Community Champion
November 11, 2025

Do a lookupissues = for the different (parts of) JQL's you are using and list these in the automation log. It would reveal to you why you aren't seeing the right issues in the end.

- People that use logging are perceptive of the fact that sometimes other people would need to look into their automations and actually understand them. -

Be one of them.

Kind regards,
Dick

Dick
Community Champion
November 12, 2025

Drawing a Venn diagram is also useful to get a grasp on how operators like notor and and work.

Kind regards,
Dick

Suggest an answer

Log in or Sign up to answer