Prevent Workflow transition if field value entered has duplicate
Asked by Doods Perea:

When a user transitions to a new status, a screen appears that requires the user to enter a unique value for the "Serial Number" text field.

If the user enters a duplicate serial number, I want to prevent the transition, and show an alert (either in the transition screen or on the main screen) that says "You have entered a duplicate serial number".

How can I achieve this, either out of the box, or with a Jira app?

Thanks for your help.


Answers:
author: Ste Wright
body: Hi [@Doods Perea](/t5/user/viewprofilepage/user-id/3401409)

It's not available natively; I'm not sure which Apps would be able to do this - but I'd contact the vendors for Apps such as...

1. [ScriptRunner for Jira](https://marketplace.atlassian.com/apps/6820/scriptrunner-for-jira?hosting=cloud&tab=overview)
2. [Power Scripts - Jira Workflow Automation](https://marketplace.atlassian.com/apps/43318/power-scripts-jira-workflow-automation?hosting=cloud&tab=overview)
3. [JSU Automation Suite for Jira Workflows](https://marketplace.atlassian.com/apps/5048/jsu-automation-suite-for-jira-workflows?hosting=cloud&tab=overview)
4. [Jira Misc Workflow Extensions (JMWE)](https://marketplace.atlassian.com/apps/292/jira-misc-workflow-extensions-jmwe?hosting=cloud&tab=overview)
5. [Jira Workflow Toolbox](https://marketplace.atlassian.com/apps/29496/jira-workflow-toolbox?hosting=cloud&tab=overview)
6. ...or another App from the [Marketplace](https://marketplace.atlassian.com/search?hosting=cloud&product=jira&query=workflow)

...and see if they can suggest a method of doing this using their App. Their contact details can be found in each listing's Support tab.

---

I can think of a native workaround, but it's not an ideal user experience. You could use [Automation](https://support.atlassian.com/cloud-automation/docs/jira-cloud-automation/) to...

* Check for all issues transitioned to this status (i.e post-transition)
* Clarify if the Serial Number is in use on another issue
* If it is, reverse the transition
* And notify the user (either via email or comment) that the Serial Number is in use and they must choose a unique one

---

Let us know your thoughts!

If you'd like more instructions on how to build the Automation Rule, we'd be happy to help :)

Ste

comments: author: Vicente Dom?nguez _Decadis AG_
body: Hello [@Doods Perea](/t5/user/viewprofilepage/user-id/3401409) and thank you [@Ste Wright](/t5/user/viewprofilepage/user-id/1166470) for mentioning us!

I am part of the Decadis team and, although I think that it is not possible to validate with a [JWT for Jira Cloud](https://apps.decadis.net/display/JWTCLOUD/JWT+for+Jira+Cloud) [validator](https://apps.decadis.net/display/JWTCLOUD/Validators) if a serial number was already used in a previous issue with our app, it might be possible to update the new issues automatically with a serial number that was not used before.

If you are interested in this approach and need further assistance, please, feel free to create a request in our [Support Portal](https://decadis-apps.atlassian.net/servicedesk/customer/portals).

Best regards,

Vicente


author: John Funk
body: Hi Doods,

You most certainly will not be able to do that out of the box with Jira. And not sure about any apps that might do that. Maybe ScriptRunner Behaviours.


Tags: cloud

jira-service-management

jira-service-management-cloud