Forums

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

Jira Cloud: validation that custom field doesn't match certain string during transition

Marat Kiniabulatov
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.
September 24, 2019

Hey folks, I need your help with validation.

The task is -

  1. during transitioning to -> %targetStatus%
  2. Custom multiline field "A" should't match exact string "ab"
  3. In case it matches - we don't allow transition, and bring up the error of "you need to add info to field “A” in order to move to %targetStatus%”

 

Jira Cloud, no additional plugins like scriptrunner are added.

 

The Crutch..

 

The crutch of previous days that doesn't allow me to handle that situation above the proper way (to just not allow empty field during transition):

is that Jira Cloud doesn't allow to show empty custom field in the issue view.

Because of that I have to predefine that field with "Don't forget to fill this field before Code Review".

And no, adding " " or double space "  " doesn't help you - as Jira Issue View renderer still counts "  " and " " as EMPTY. Thus doesn't show EMPTY custom field :(

1 answer

0 votes
Kristian Walker _Adaptavist_
Community Champion
September 25, 2019

Hi Eskimo,

I do not believe this requirement would be easily possible out of the box using the validators  that come as standard with Jira Cloud  although the Regular expression validator  may allow you to achieve what you require. 

I would advise looking at an add on that can provide this functionality. 

However, I can advise that this requirement will not be possible with ScriptRunner for Jira Cloud due to the fact that the ScriptRunner for Jira Cloud plugin is unable to provide the same workflow validators functionality that the server version provides.

The reason we are unable to provide this functionality is due to the restricted functionality and API's which Atlassian provide inside JIRA Cloud, due to the fact that Atlassian only provides a Rest API in Jira Cloud and not the same Java API that the server version contains.

You can see more detailed information on the differences between ScriptRunner for JIRA Cloud and ScriptRunner for JIRA Server inside of the documentation page located here.

If this response has answered your question can you please mark it as accepted so that other users can see it is correct when searching for similar answers.

Regards,

Kristian

Suggest an answer

Log in or Sign up to answer