Is it possible to prevent a group os users from moving the tickets forward if there is no pr associated with the ticket or whether the pr's associated with the tickets haven't been merged ?
First I tried using automation that whenever a ticket moves forward using a smart value check make sure that all pr's are merged and if they aren't move the ticket back but it came with the challenge of that it should be possible according to the workflow...
So next came towards the workflow rules and have been stuff there
It should be possible with Jira expression-based validators provided by third-party apps; there are a couple of options available on the Atlassian Marketplace.
It comes down to validating the content of the Development field, which might seem tricky at first glance, but it is not that hard. The value of the field is a JSON saved as a string. For example:
"{pullrequest={dataType=pullrequest, state=OPEN, stateCount=1},
json={\"cachedValue\":{\"errors\":[],\"summary\":{\"pullrequest\":{\"overall\":{\"count\":1,\"lastUpdated\":\"2024-05-28T10:24:34.912+0200\",\"stateCount\":1,\"state\":\"OPEN\",\"dataType\":\"pullrequest\",\"open\":true},\"byInstanceType\":{\"bitbucket\":{\"count\":1,\"name\":\"Bitbucket Cloud\"}}}}},\"isStale\":false}}"
You can use Jira expression to test against the state, for example:
issue.customfield_10000.includes('state=OPEN') ? true : false
When the PR is merged, the value should contain: 'state=MERGED'
I am from Forgappify, and we developed Jira Expression Validator, that you can utilize, 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
Hi @Samarth Sharma ,
We're talking about pull requests here, right? I don't think you'll natively manage to get this; but yes - the idea is to use workflow conditions/validators to restrict changing statuses.
People usually use apps such as JWME and/or ScriptRunner to achieve this > see the following thread.
As for automation, there are smart values for development tools but I haven't used these that much so it would probably take some time to see if it's possible to check if pull request exists on an item and then transition the item back to its previous status. But again, the WF validator/condition would be a more suitable solution.
Cheers,
Tobi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.