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

3 answers

1 vote
Ahmad Danial Mohammad _Appfire_ November 16, 2021

Hi, @Kiranped .

May I suggest the usage of the JMWE Scripted (Groovy) Validator and verify that there is a value returned when you use this Groovy script?

issue.get("Development").pullrequest

 From there, you can expand the requirement where needed.

jcasarrubias October 16, 2022

Hello @Ahmad Danial Mohammad _Appfire_ 

Do you know if it works for Jira Cloud?

0 votes
John Funk
Community Champion
November 15, 2021

Hi @Kiranped  - not sure of the exact syntax for the pull requests, but since it looks like you are using JMWE, you might take a look at this previous post for something similar.

https://community.atlassian.com/t5/Jira-questions/Jira-Workflow-condition-or-validator-on-development-panel/qaq-p/1086560

0 votes
Tinker Fadoua
Community Champion
November 14, 2021

@Kiranped 

You will need a plugin.

Do you have ScriptRunner for Jira by any chance?

Best,

Fadoua

Kiranped November 18, 2021

Yes, I have

Kiranped November 18, 2021

Let me try and update. Thanks in advance :)

Tenzing Doleck
Contributor
April 17, 2023

@Fadoua any help here?

Suggest an answer

Log in or Sign up to answer