Hi everyone,
I want to create an automation that prevents a task from being created twice by mistake. For this I need a JQL that searches for 4 characters (numbers or letters) between two underscores in the summary (e.g. _0110_), since these are contained in the summary of each project. If there is already a project that contains exactly these four characters in its summary, the creation of the task should be prevented.
How must the JQL look like for this?
Best regards,
Pauline.
Jira automation, if you are thinking of implementing your thought with that, it will not be of any use. Jira automation is executed as a post function and not as a validator.
Out of the box you can't search for this, meaning a set of substring located between two other characters (you could use smart values on Jira automation, but again this would not prevent your users for creating a subtask). You will need an app like JMWE, JSU, JWT. Do you have any of that?
Thank you very much for your answer.
Unfortunately I don't have any of the apps you mentioned. How could I make this work with one of the apps? And is there any other way to get at least a hint when creating already existing task?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Pauline Hild and thank you @Alex Koxaras _Relational_for mentioning us!
You could use a Jira expression validator to validate the summary of the newly created issues with an expression similar to the following one:
!issue?.summary.includes("_10011_" || "_10012_")
In this case, the validator will allow the transition only if any of the texts between brackets is not included in the summary of the current issue.
Unfortunately, we are still unable to retrieve the summaries of the projects, so the texts between brackets will need to be hard coded into the expression.
I am part of the Support Team for JWT. Please, do not hesitate to contact us if you have any question regarding JWT Cloud via our Support Service Desk.
Best regards,
Vicente
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Alex Koxaras _Relational_ ,
Thank you so much for responding to my question. If I understood it correctly, I would need to add the letters/numbers from all existing projects into the Jira expression validator to exclude that a project with the same characters is created twice, since matching is not possible automatically?
Beste regards,
Pauline
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Pauline Hild on your question you spoke about issues. Which one is it now? Issues or projects?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry for the terminology confusion, it's about Issues- Tasks, to be precise (each Issue is a separate project, hence the confusion).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For all future created issues you have to add a validator on the create transition of all the issue types to which you want to include this restriction. E.g. If you want not to allow users to create Tasks and Bugs if their summary contains a certain "string", then you have to apply this validator to all separate workflows. If Task and Bug are using the same workflow, then you have to apply to it once.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
All right. But again, I need to specify which characters should not be in the summary, since there is no way to automatically match if the same characters are already in a summary?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Pauline Hild sorry but I dont fully understand your requirement. You want to search for issue that contains any number between two underscores (_) and if you find such issue, then don't allow the creation of this issue?
E.g.
Is the above correct?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From further search I did unfortunately I have bad news for you concerning at least my proposed solution: It seems that it's not possible to validate an issue against others, due to restrictions from Jira (to get a bit more technical you have to use only jira expressions and you can't use REST API to retrieve a collection of issues, against which you will run your jira expression).
So to get back to your initial query:
Unfortunately you can't prevent an issue of being created via the automation. As I said, the automation runs after the issue being created. So that's the time when the automation will run. Perhaps the only thing you could consider is if you want the user to create the issue, and have an automation deleting it afterwards.. If yes, let me know and I'll try to create this rule for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your efforts up to here to help me out! I am interested in such an automation and would be very happy about help with the creation of the rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.