Workflow field validation error message sometimes appear on top of screen and sometimes on bottom of field.

Tayyab Bashir Community Champion Nov 28, 2016

JIRA version 7.0.10

While missing a mandatory field sometime the message displays on top of screen and sometime it is displayed with the field which is confusing. 
Either display the actual message always on top or at least display a generic message on top like "some mandatory field is missing"

OR how can I configure it so all the messages are displayed on top? 
See attachment 1 and 2.
They depict an example of a custom field which was put on "Create Issue Screen" and then on a regular transition.

Error_on_bottom.PNGError_on_top.PNG

 

1 answer

1 vote
Mahesh S Community Champion Nov 28, 2016

There are three ways to set a field mandatory.

1) You can set the field required validation in Create step using the field required validator as shown below.

image2016-11-29 15:33:58.png

The error message will be set at the top of the screen.

2) Set the validation using script validator where you can set the validation along with an option to set the place where you need the error message to display.

image2016-11-29 15:28:29.png

3) Third one is to set a field mandatory always using Field Behavior. It displays on both places.

image2016-11-29 15:37:0.png

 

So, please use these choices and set it in a similar way, you needed.

 

Cheers!

Mahesh

Tayyab Bashir Community Champion Nov 29, 2016

Hi,

The field I made required is by using method 1. 
By workflow validator.

However, there are two results for it.
When the field is placed on create issue screen, the error is on top.
When the field is placed on any other transition , the error is at bottom of field.

Mahesh S Community Champion Nov 29, 2016

Hi Bashir, I have cross-checked all these 3 methods both on create screen and in transition screen. The behavior is consistent.

Please re-check from your side that you are using the same kind of validations in all transitions.

In addition to that, I have two more points here after taking a closer look into your screen shots.

  1. When a field is indicated with a red asterisk (customfield*), this means that you have made this field mandatory as always from Field Configuration (as described in our third method). So you dont need a separate validator here.
  2. In the create screenshot, the error message says that your field 'Discovered via' is not available in the screen itself. But I could see that. Are you having the right field in your screen and validating? Does a duplicate field 'Discovered via' exists? Or you have messed up the error message?
Tayyab Bashir Community Champion Nov 29, 2016

I've checked it again too.
In the screenshots, the discovered via field is mandatory in both the screens; create issue and the other transition. 
I have put the workflow validator, field required to make it mandatory on both screens. 

According to you the error should be on top, which it is not. That's what strange for me. 

For your additional points:
The fields have not been made required from the field configuration. The red asterisk marks are coming from a script I've written which just looks up the list of mandatory fields in Workflow's Field Required validator, and puts an red asterisk against it. 

There are no duplicates of Discovered via as well. 

Could you try to reproduce it in the following steps? 
1) Create a new custom field. (Discovered via is a single select list)
2) - Add the field on Create issue screen of a project.
    - Add the field on some other transition. 
3) Make the field required from Workflow validator, (Field Required) for both the screens. 

4) check for the error messages. One would appear on top, and one would appear at the bottom of the field. 

 

Tayyab Bashir Community Champion Nov 30, 2016

Discovered via field is "Project Attribute Field" (coming from a custom plugin)
Does that make any difference with how the errors are shown?  

Mahesh S Community Champion Nov 30, 2016

I have tried these steps again.

1) Create a new custom field. (Discovered via is a single select list)
2) - Add the field on Create issue screen of a project.
    - Add the field on some other transition. 
3) Make the field required from Workflow validator, (Field Required) for both the screens.

The error messages are at the top of both the screens.

Hang up! Before concluding, lets make one more thing clear that, there used to have to types of validators. One is 'field required validator' and another 'fields required validator'. Where, the first one shows the error message at bottom of field I guess. However I dont have that option now to check in my plugin version.

If not the case, I doubt your custom plugin. smile

Tayyab Bashir Community Champion Nov 30, 2016

Hi Mahesh,

I have checked and the custom plugin just creates a field. The field is further made mandatory by JSU "Field Required" option. 
I think this is a bug on JSU's part.

If I create a issue via form (meaning a popup appears and you fill it out to create issue), then the error message are shown at the bottom of the field.

However, if open up the issue creation form in a new window (like the example from your screenshot), then the error is shown at the top of the page.

Suggest an answer

Log in or Join to answer
Community showcase
Emilee Spencer
Published Friday in Marketplace Apps

Marketplace Spotlight: DeepAffects

Hello Atlassian Community! My name is Emilee, and I’m a Product Marketing Manager for the Marketplace team. Starting with this post, I'm kicking off a monthly series of Spotlights to highlight Ma...

50 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot