Unable to create sub-task after making custom field required

Jira Subsari September 4, 2019

I have created two custom fields which are required for some projects.

  1. Created new project
  2. Created custom screen layout
  3. Created custom field configuration scheme (and assigned it appropriately to the project)
  4. Made two custom fields required

Success - Able to create Epic and prompted for custom field values as expected.

Success - Able to create Story and prompted for custom field value as expected.

Error - Unable to create Sub-task, two fields require value as expected, but also getting this error which is preventing me from creating subtask.

-----------

Epic Link

A subtask cannot be assigned to an epic.

Choose an epic to assign this issue to.

-----------

I have not changed any Epic Link related requirements.

How can I make the two custom fields required and be able to create subtasks?

Current Workaround: I've implemented the logic to requiring custom fields on transition of creating an issue or when completing it, but this requires making the transition requirements for every transition, otherwise I risk fields not being populated all the time. Hoping to find an easier solution.

1 answer

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 4, 2019

You need two field configurations - one for the top-level issues, the other for subtasks (with the field optional on the sub-task configuration)

Jira Subsari September 6, 2019

This is helpful to know. I've implemented this and it solved the issue.

Only follow-up question now is that, using this approach, I cannot make make a field mandatory through field configuration at the sub-task level. I'd have to make it mandatory during transitions, is that correct?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 14, 2019

No.  You have separated out the field configurations so that issues and sub-tasks behave differently already.  You can change the field configuration for sub-tasks to make a field mandatory.

This flag is for every step though.  If a field is mandatory, you need to enter it on issue creation and you cannot blank it out at any point.  If you want to do "field mandatory during a transition", you need to use "validators" in the workflow to say "must fill this in here"

laura iacob October 15, 2020

@Nic Brough -Adaptavist- Hello. I bumped into the same issue. Making a field required for Story makes it required for Sub-task as well. In my project's Field Configuration Scheme I have 2 field configurations: a Default Field configuration where my field is not required - this is for all unmapped issuetypes where Sub-task is included. The second Field configuration is associated with Story and it has my field required. What am I  doing wrong? Thank you!

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 17, 2020

Nothing from what you've said.  I would want to closely check that you really do have a field configuration scheme that says to use two separate field configurations for Story and Default, in this project.  

I can't find a way to replicate this issue unless I'm sharing the field configurations across all issue types.

laura iacob October 19, 2020

I have made some screenshots.

In Project settings I can see my field configuration scheme. I will call the second field configuration (the one I painted over) Blue Field Configuration:

project settings scheme.png

When I click on Country required Field Configuration Scheme I get the 2 configurations and their mapped issue types:

field configurations in scheme.png

When I expand the Default Field Configuration

Default Field Configuration.png

Scroll down to Country, I can see Country is not required:

Country not required.png

 

When I expand the Blue Field Configuration

Blue Field Configuration.png

Scroll down to Country, I can see Country is required:Country required.png

 

Does this raise you any flag?

 

Thank you so much

laura iacob October 19, 2020

Also, this seems to be a separate issue, not sure if it's connected, but when I try to create a Story, the Country field is marked with asterisk while on creating a Sub-task is not and it's requested only when I try to submit it

laura iacob October 19, 2020

I managed to figure it out by searching why the asterisk is not displayed. It was about validators in the Create transition which I didn't know about

Suggest an answer

Log in or Sign up to answer