Making a custom field mandatory..what is the correct order of doing things?
Asked by Chacha20:

I want to make a custom field mandatory for 'Story' issue type. I cannot do it at a project level as there are around 50 or so projects that need the field to be mandated.

The current setup is complex in that there are multiple schemes setup for 'Story' issue type as well as screen schemes etc.

I am confused about what logical order I would follow to make the field mandatory..for example, do I update something in screen schemes or issuetype schemes or workflow schemes etc.

Thank you in advance


Answers:
author: Ste Wright
body: Hi [@Chacha20](/t5/user/viewprofilepage/user-id/5388970)

It looks like this is a Company-managed Project, based on the fact you mentioned screen schemes - is this correct? I also assume this is internal creation of a Story?

If yes, you need to use Field Configurations / Field Configuration Scheme to do this - which can be applied to all 50 Projects.

Using a Field Configuration you can...

* Make custom fields mandatory
* Apply the setting to just one Issue Type, whilst keeping the field optional in other Issue Types, using multiple Field Configs in a Field Config Scheme

To find out more, check this help page: <https://support.atlassian.com/jira-cloud-administration/docs/manage-issue-field-configurations/>

---

If these Projects are **Team-managed,** you'd have to make the field required on each Project singularly.

You can do this from Project Settings \> Issue Types \> Story, and opening the field's settings ("\>"), where you can make a field "Required"

Ste


author: Asha Goyal
body: Hello [@Chacha20](/t5/user/viewprofilepage/user-id/5388970)

In agreement with the questions raised by [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011) there are several ways to make the field mandatory:

If you need the field to be madatory at all times, you can do so by making the field required in the field configuration (keep in mind the projects sharing the configuration)

If you need to make field required during a transition, it can be done by field required validator (keep in mind if the workflow is shared by other issuetypes or projects)

If you need to make field mandatory conditionally, it can be done by scriptrunner behaviour

Kindly Accept and vote if this helps

Thanks

Asha


author: Trudy Claspill
body: Hello [@Chacha20](/t5/user/viewprofilepage/user-id/5388970)

You have posted your question in the Jira Service Management forum. Are you trying to apply this to Jira Service Management projects or another type of project (Software or Business)?

In addition to that, are the projects where you want the field to be required Company Managed projects or Team Managed projects? You can see that in the information shown on the **View all projects** page under the **Projects** menu.

Lastly do you want the field to be required at all times; when trying to initially create the issue and at all times through the issue's life cycle? Or do you want it to be required only sometimes? If only sometimes, what are the conditions for when the field should be required?

comments: author: Chacha20
body: Thank you for your response and yes it is a **Team managed projects**.

and yes, I do wish the field to be required at all times (creating, editing the issue throughout the life cycle of the issue).


author: Trudy Claspill
body: In your original post you said:
> The current setup is complex in that there are multiple schemes setup for 'Story' issue type as well as screen schemes etc.

"Schemes" apply only to Company Managed projects. Given that you have said the projects you want to change are Team Managed projects, then the answer provided by [@Ste Wright](/t5/user/viewprofilepage/user-id/1166470) applies:
> ---
>
> If these Projects are **Team-managed,** you'd have to make the field required on each Project singularly.
>
> You can do this from Project Settings \> Issue Types \> Story, and opening the field's settings ("\>"), where you can make a field "Required"
>
> Ste

~~However, that applies only to custom fields created locally within the Team Managed project.~~

~~If in your Team Managed projects you are reusing a globally defined Custom Field set up through this screen (https://**yourBaseUrl**/secure/admin/ViewCustomFields.jspa) you will not be able to make such a field Required within your Team Managed projects.~~

I was wrong. You can make Global context fields Required in Team Managed **Service Management** projects. Thanks [@Ste Wright](/t5/user/viewprofilepage/user-id/1166470) for making me retest my findings!


author: Ste Wright
body: Just to add, it seems to work for me for both global and local TMP fields :)

Ste


author: Trudy Claspill
body: Hm, when I added a global context field to a Team Managed project the Required option for that field was disabled.

![Screenshot 2024-03-18 at 4.45.46?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/312881i77581C28DDBC6E13/image-size/large?v=v2&px=999 "Screenshot 2024-03-18 at 4.45.46?PM.png")


author: Ste Wright
body: Strange! I tried again with a Select List, and it's still available for me.

Ste


author: Trudy Claspill
body: Ah, my bad.

I was adding the Global context field to *Software* Team Managed projects.

I can set them to Required when I add them to a *Service Management* Team Managed project.

![Screenshot 2024-03-18 at 5.36.04?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/312888iBA574333CC45FA00/image-size/large?v=v2&px=999 "Screenshot 2024-03-18 at 5.36.04?PM.png")


Tags: jira-service-desk-cloud

jira-service-management

jira-service-management-cloud