Forums

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

I need a workflow validator to check if the Jira issue has at-least one pull request

Kiranped
November 14, 2021

I need a workflow validator to check if the Jira issue has at at-least one pull request

I see we have a JQL search workflow condition to check the Jira issue has at least one pull request but I need a validator, how do I achieve it?

JQL Query : status != Closed AND development[pullrequests].all > 0

6 answers

1 accepted

5 votes
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
January 30, 2013

Ah, good, then I think you just need to tweak the watcher != bit. I think that is being read as "the watcher is not the current user". Looks right at a glance (and it completely confused me on my first comment too), but thinking about it, I think that will only match cases where the current user is the *only* watcher.

I think it needs to be "key not in watchedIssues()", because that says "check each issue, get the list of watchers and drop it if the current user is in there".

Torturous to explain in English, but it probably makes perfect sense in logic/computer

4 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
January 30, 2013

Try:

assignee was estrom and key not in watchedIssues() and status != Closed ORDER BY status ASC, key ASC

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
January 30, 2013

Damn, I think I am the only one seeing my answer. lol.

Esther Strom_ ACP-JA
Contributor
January 30, 2013

No, I see your answer. But it's the same as Nic's, and my conversation with him started before you posted your answer.

Udo Brand
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
January 30, 2013

Vote up since you were first

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
January 30, 2013

I have converted his comment as an answer.

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
January 30, 2013

@Esther Do you still have your email notifications? ;) Anyways, Nic deserves it for the explanation he gives. He is the man!

0 votes
Esther Strom_ ACP-JA
Contributor
January 30, 2013

Thanks, Nic. That worked. If you want to post as an actual answer, I'll accept it.

0 votes
Udo Brand
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
January 30, 2013

In the query above it schould be watcher not in (currentUser()) since watcher != currentUser() does not work

I was wrong:watcher != currentUser() is working . Had a typo in my query

0 votes
Esther Strom_ ACP-JA
Contributor
January 30, 2013

You're right, Nic - that was a typo. It's supposed to say that it's still returning issues where I AM listed as a watcher.

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
January 30, 2013

Um, I'm stuck. You say you want to find issues where you are not a watcher (before the JQL, which, incidentally, looks like it should work), then say that it's returning issues where you are not listed in the watcher field. That sounds correct? I suspect a typo here?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events