Forums

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

Need to avoid duplicate ticket creation based on the custom field value

PLaksh11
Contributor
August 3, 2026

Hello Community,

 

We are using Custom field(Single line text field) in Create screen which contain "Asset ID".

Once user create one ticket, then he Should not create new ticket with same asset ID.

Ex: 1. First ticket contain "ABC123" in Asset ID field and create new ticket.

      2. For Second ticket if user Enter "ABC123" in Asset ID field then error should display in Create screen and transition should be blocked.

 

Note: 1. One more condition, If user already created One ticket with "ABC123" and ticket is moved to done state and completed 3 months. then it should allow user to create new ticket with Same Asset ID "ABC123"

Is there any way that we can user any validators to completed this activity. Currently we are having "Script runner" and "JMWE" Plugins.

 

Thanks,

Prathap DL

 

2 answers

1 vote
Tomislav Tobijas
Community Champion
August 3, 2026

Hi @PLaksh11 ,

For this, you'll definitely need scripted validators, as you cannot build something like this natively (at least not yet).

It can probably be built with something like this:

  1. Retrieve the Value: Get the "Asset ID" entered by the user on the Create screen.

  2. Run a JQL Query: Search for issues where:

    • The "Asset ID" field matches the current input.

    • The issue is not in a "Done" state OR it was resolved within the last 90 days.

  3. Validation:

    • If the JQL returns any issues, the validator should fail and display your custom error message (e.g., "This Asset ID is already in use by an active or recently completed ticket").

    • If no issues are found, the transition is allowed.

However, I did not actually build this specific example to have a script or something ready. 👀

If you have Rovo, it should definitely be able to help you build the logic you can use here.

You could also reach out to Appfire or Adaptavist directly to see if they can provide actual examples of logic and scripts you could use here. 🎟️

Cheers,
Tobi

PLaksh11
Contributor
August 3, 2026

Hi @Tomislav Tobijas 

Thanks for the response.

We are raising ticket with Script runner team for the support.

 

Regards,

Prathap DL

0 votes
Duc Thang TRAN
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 Champions.
August 3, 2026

Hello @PLaksh11 

I think this requirement is quite complex to implement on the Create screen because the app would need to continuously check the value entered in the Asset ID field against existing issues.

ScriptRunner Cloud is also more limited than ScriptRunner Data Center, especially for behavior feature

My suggestion would be to use Jira Automation instead:

Trigger the rule when an issue is created.
Use Lookup Issues to search for issues with the same Asset ID. If {{lookupIssues.size}} > 1, a duplicate exists.
Automatically close the newly created issue, add a comment explaining the reason, and link it to the existing issue.

This solution will not block the issue directly on the Create screen, but it is much simpler 

Happy monday :)

PLaksh11
Contributor
August 3, 2026

Hi @Duc Thang TRAN 

Thanks for the reply.

We also have this in our mind as last option. If we are not able to achieve what we planned then we will use this as alternative approch.

 

Regards,

Prathap DL

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events