Hello Team,
I need to restrict the reporter in creating the same request (Ex: Request for a New Laptop) till the existing ticket is Closed/Cancelled.
Hosting Type: Data Center
We use plug-ins like Script Runner, JSU, JMWE.
Please suggest a way to achieve this.
Thanks in advance!
Hi @Sriharsha
what do you mean by "same request"? Do you mean an existing, open request (issue) of the same customer request type? Or any issue in the same project with the same Summary?
Assuming you mean the same request type, you can add a Scripted (Groovy) Validator with a script like:
jqlSearch( "project=${issue.projectkey} and \"Customer Request Type\" = \"${issue.get("Customer Request Type")?.name}\" and status not in (Closed,Cancelled)", 1).size() == 0
Hi @David Fischer ,
Thank you for the quick response!
Yes, you are correct. What I meant is an existing, open request of the same request type.
And, also we need to take care of the Custom Field - "Hardware Item " which is a select list (single choice) of the same request type.
Ex - Laptop, Desktop, etc.
If an 'X' reporter raised a request with Hardware Item Called "Laptop" and the issue is still open. At this point of time, the same reporter 'X' cannot create a new request with same Hardware item called "Laptop".
Hope I'm clear.
Regards,
Sriharsha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sriharsha ,
you can add that condition in your JQL expression:
jqlSearch( "project=${issue.projectkey} and \"Customer Request Type\" = \"${issue.get("Customer Request Type")?.name}\" and status not in (Closed,Cancelled) and \"Hardware Item\" = \"${issue.getAsString("Hardware Item"}\"", 1).size() == 0
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.
Hi @Sriharsha
On the "on create" transition of your issue type you have to add a validator to check of any issuetype of the same request type of the same reporter exists. If that happens, then a message will appear on the customer (reporter). Of course you have to make sure that the check you perform is indeed the one you need and that it will not yield an error.
Alex
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.
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.
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.