Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How does jira check that a required field have a value?

Tomas Gustavsson
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 22, 2021

Hi all

Hope to get an answer.
I have a custom field of type date picker configured as required,  I have added it to a transition screen.

In some cases this required field, have a value before I actually require it, via my transition screen. 
What happens is that we in this situation needs to change to another date in order for jira to understand that this field has a value., otherwise the workflow does not let us transition the ticket. 

Any idea on a workaround for this?  

2 answers

1 accepted

0 votes
Answer accepted
Iago Docando
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 22, 2021

If a field is set as mandatory then it must have a value in order to create the issue in the first place.

If what you want is to assure any given field has a value at some particular point in your workflow what you must use is a validation in the appropriate transition.

I don't think there's a validation to check if the field value changes on transition but I guess you can resort to jira automation or some scripting tool in order to check this and in case it doesn't change then refuse the transition. 

0 votes
Alex van Vucht (GLiNTECH)
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 22, 2021

My interpretation here is that:

  1. You are working with vanilla Jira server, with no plugins.
    1. Vanilla Jira does not have a Validation for date picker custom fields.
    2. If you are using any plugins, especially plugins that can affect screens, workflows, and issue data, they may be the culprit and you should reach to their vendor for their support.
    3. It's really common for Behaviours or Dynamic Forms to do weird things to fields while on a screen, because these use client-side libraries to modify fields and that's not always well-supported.
  2. You have a Date picker custom field that:
    1. Has context for your project and issue type.
    2. Has no default value configured.
    3. Is only on the transition screen and no other screen.
    4. Has been configured as "required" in your service desk's field configuration scheme.
    5. Sometimes, when loading the transition screen, it has a value pre-populated and the "field required" is not recognising the pre-populated value.

There are two potential causes here:

  1. Something is modifying the field before it gets to this form.
    1. Check the changelog, and see if you can identify the person or service that is modifying this issue. Even if the field is not on a screen, in Jira Server, as long as the field has context, it can be updated via API or bulk changes.
    2. If you don't see a changelog, something may be modifying your database directly, which is not supported
  2. The form is not recognising that the field has been used once already. Every case should have a respective changelog that shows the issue being transitioned and this field being modified.

If it's the latter case, and the assumptions above are true (especially, you are not using any plugins), then you may have a case for Jira support. These issues are almost always due to plugins or automations having unexpected behaviours.

The workaround is simple. Stop the field from being required and either:

  • Buy a plugin that has a workflow Validation to check that Date Picker field is populated, or
  • Use service desk automation to alert the agent and/or service desk manager when they have transitioned the issue but not populated this field.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events