Hello,
We would like to block the creation of more than x tickets at a date defined in the ticket which is a mandatory field when it is created.
We have create a validator on the transition “Create” with script runner. However our code does not work, would you have any advice ?
Here is the code we have on the validator :
import java.util.logging.Logger
String projectUrl = get("/rest/api/2/issue/ITEST-59").asObject(Map).body['fields']['project']['self']
Logger logger = Logger.getLogger("")
http://logger.info (get(projectUrl).asObject(Map).body.name)
We are on Jira Cloud.
Thank you for your help,
You can sort of do this natively using Automation. You can't block the creation, but you could notify a user after creation, and/or delete the issue.
This rule will...
---
For example...
---
A few notes...
---
Let us know your thoughts!
Ste
Hi Flavie,
I can confirm that ScriptRunner for Jira Cloud Workflow validators use the Jira Expression framework provided by Atlassian, and the Jira Expression Framework does not provide any way to use JQL in an expression.
This, unfortunately, means there will be no way in the validator to search for the number of issues created on a specific date and block the creation of the issues due to this.
I hope this information helps.
Regards,
Kristian
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.