It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bitbucket ScriptRunner Merge Check - Require jira tickets in jql filter not checking all tickets

Hi,

I'm using the Adaptavist Scriptrunner built in merge check to validate that all tickets on a pull request must show in the jql filter.  The issue is if there are multiple jira tickets associated with the merge commit it will allow the merge to go through if only 1 of them matches the jql criteria.  The docs says it will check all tickets so I would expect it to not be merge able unless all tickets appear in the jql.  Any advise or clarification here?

Thanks,

Matt

 

 

1 answer

0 votes

Hi Matt,

The merge check will allow the merge if at least one of the Jira issue keys on the pull request exists in Jira.

Sounds like your case requires something different. Is the merge commit made before you merge the pull request or after you merge? I'm assuming before for it to be picked up by the merge commit?

Thanks,
Adam

Its not coming from a merge commit.  We're using pull requests to control hot fixes and if a dev rolls several fixes into a single pull request it will pickup multiple jira tickets.  My assumption (not clear in the docs) is that all tickets have to match up.

Is there a way to make it work this way?  Would it be possible to go with a custom groovy script?  If so...do you happen to have an example?

So, is there anyway to make it work this way?  What about just going with a custom script?  Are the built in checks opened sourced?

I'm also looking for an answer to this.  We have the exact same issue - merge check passes if any tickets match, but we need all tickets to match.  

Is there a way to write the JQL to force all tickets to match?  

If not, how can we do it with a custom script?  How do you list all Jira tickets associated with a PR?

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published Apr 03, 2019 in Marketplace Apps

How to estimate projects more accurately?

Gaining insight into your team’s effectiveness and choosing the right estimation technique.   Estimating projects is hard. It is because people have the tendency to underestimate the time thin...

288 views 2 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you