Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Open ticket restriction by categories

Ariel Gavillon August 22, 2019

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

2 answers

2 accepted

0 votes
Answer accepted
Radhika Vijji _Innovalog_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2019

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

0 votes
Answer accepted
Mike Rathwell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 22, 2019

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.

Ariel Gavillon August 25, 2019

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

Mike Rathwell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 26, 2019

Hi @Ariel Gavillon 

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

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, jira cloud certification, managing jira projects, jira project administration, jira cloud exam, atlassian certification, agile project management, jira workflows, jira permissions, jira training, jira cloud skills, atlassian learning

Become a Certified Jira Service Project Expert 🦸🏻‍♂️

Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.

Get Certified! ✍️
AUG Leaders

Atlassian Community Events