Forums

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

JIRA Cloud - How to have unique value in custom field

Gerencia PS May 29, 2018

I am using a jira cloud version. Im my instace have a custom field that basically its a serial number (Text Field (single line))  which is coming from external system and user of jira manually enter it.

Now my need is to have this field contain unique field. Ex: 000012345 entered at the time of creation of new task and should not be used again in the same field if some one else trying to create new task.

2 answers

0 votes
Nic Brough -Adaptavist-
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.
May 29, 2018

There's no way to do this on Cloud - it does not have the framework to allow you to check that a value is unique either on screen or in a validator.  The best you could do would be a post-function that searches for the value that a user adds and if it finds it, writes a new comment or custom field into the current issue to say that the value has already been used, so you can search for them.

Gerencia PS May 29, 2018

How would I do to do this post-funcition configuration ?

Gerencia PS May 30, 2018

@Nic Brough -Adaptavist- How would I do to do this post-funcition configuration ?

Like mpfluegl likes this
Nic Brough -Adaptavist-
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.
June 3, 2018

There's some sample code for setting a custom field over at http://scriptrunner-docs.connect.adaptavist.com/jiracloud/post-functions.html - it also reads custom fields

0 votes
Wouter Bruinings
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.
May 29, 2018

We would use the Power Script plugin by cprime.

We'd write a validator script, checking if any other ticket in the project would already use that specific value. 

However, this could result in the create transition executing slow, in case a large number of tickets needs to be checked.

Gerencia PS May 29, 2018

Can you send me that script ?

Wouter Bruinings
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.
May 29, 2018

I cannot, but there is very extensive documentation. 

Like Jun Li likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events