The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Need a issue workflow condition/validator to check if PR exists has been accepted

M Amine
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.
April 29, 2018

Hi,

I have been looking for a plugin (or even a groovy script) to use on issues related to a bitbucket branch upon issue transition in order to 

  1. Check if a Pull-request exists
  2. If yes, check if the pull-request has been accepted

Can you please help on this  (both for Server and Cloud)?

And if a solution exists, do you think it is possible to apply with another DVCS like gitlab for example?

Thank you vm

 

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
M Amine
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.
April 29, 2018

Managed to solve this by using this plugin, for example (AM Utils or Jira Workflow Toolbox) and its JQL Validator  with this JQL "development[pullrequests].open > 1"

 

cheers

0 votes
Santhosh Kumar Arogyaswamy
Contributor
May 27, 2024

Hi,

Is this possible through the script runner validation scripts ?

Regards,

Santhosh

Maciej Dudziak _Forgappify_
Atlassian Partner
May 27, 2024

Hi @Santhosh Kumar Arogyaswamy

If you are on Cloud, then it is possible in any Jira expression-based validator including Script Runner.

The expression you need is as follows:

issue.customfield_10000.includes('state=OPEN') ? true : false

where customfield_10000 is a Development field. You may need to adjust ID on your instance. 

I am from Forgappify, and we developed Jira Expression Validator, which is part of the Workflow Building Blocks for Jira app. In our expression editor, after typing 'issue.', start typing 'Development' to receive the correct suggestion for the ID. You can also provide custom validation message.

I hope it will help.

Cheers

 

 

Santhosh Kumar Arogyaswamy
Contributor
May 28, 2024

Thanks for response. We are using the Data Center version of Jira.

Is there anyway we can use the Validators in Workflow and prompt the user if no pullrequest attached with jira issue ?

 

TAGS
AUG Leaders

Atlassian Community Events