Hi,
We want to restrict the option to open more than 1 ticket per user in a specific category in a custom field.
Does anyone have an idea how we can do this?
Regards
Hi Ariel,
With JMWE you can use the Scripted Groovy Validator to look for at least one issue created by the current user with a specific option selected for a custom field. Add the validator to the Create transition of the workflow. Your Groovy script should look something like this. Change it according to your requirement.
jqlSearch("project = TEST and reporter =" + currentUser.name + " and cf[11307] = 'Remote Category'", 1 ) == null
Regards,
Radhika
Hi @Ariel Gavillon ,
There are a handful of ways to approach this but the one that leaps immediately to mind is to use JMWE and write a groovy validator to check for current user, the value of the field, and number of open tickets. JMWE makes it pretty easy and, aside from logic will hold your hand through picking the fields and precludes you from having to add all the include and def statements to make it go for the most part.
If you haven't got JMWE... just get it; it's a staple item in my toolbox.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Mike I think is the correct tool, but need to learn to write on groovy.
Maybe you can help me to get this script for now:
We're looking for if current reporter open a ticket for cf[18901] in cascadeOption(18205) more than 1 time will get an error message that he already open a ticket something like that
If you can help us with this last thing will be great
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think @Radhika Vijji _Innovalog_ has the right idea there; it looks across all the tickets in the project and returns whether that combo is present or not yet. You probably want to have some sort of "cleanup" mechanism, however. If the project gets big with tons of tickets it can take a while to parse it all.
mike
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.