Adding custom fields for subtasks?

Robert Anthony July 7, 2015

I need to add a custom field to a subtask, and make that field being filled out mandatory for the subtask to be completed. Can someone please assist?

1 answer

1 accepted

2 votes
Answer accepted
Udo Brand
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.
July 7, 2015

Is this field mandatory on create of your subtask or only on closing (resolving). If first:

  • First you need to make sure that you have own screens for issuetype Subtask in your Project.
  • Add a screen scheme for Subtask if not already there
  • Add you new field to the subtask screens
  • Make sure you have a own Field Configuration for issue type Subtask (if not make a copy of an existing in your project)
  • and finally set this field in your Subtask Field Configuration mandatory (required)

if second

  • Add this field to your subtask screens (if not already done)
  • create a screen containing this field and use this screen in the Close / Resolve transition.
  • Add a validator (Field required validator) that this field must not be empty)
Robert Anthony July 8, 2015

The field needs to be completed before the issue can be closed (second option). Would you mind going into more detail regarding how I actually add the custom field to the subtask? That is what I'm having trouble doing, as I don't seem to be able to do it in the same way I can add the field to a parent task. Thank you. 

Udo Brand
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.
July 8, 2015

Create a screen containing this field Edit your workflow - > go to the Close transition -> edit that transition Add that screen to that transition Now add a validator to taht transition (Field required validator - use your field) Publish your workflow See https://confluence.atlassian.com/display/JIRA/Advanced+workflow+configuration#Advancedworkflowconfiguration-validators and https://confluence.atlassian.com/display/JIRA/Using+validators+with+custom+fields

Robert Anthony July 8, 2015

Thank you so far. Sorry for all the questions, I'm usually pretty good at this. But I've been dropped in the middle of someone else's project and it's kind of a nightmare to sift through. If I am working with a workflow thats already been created, how can I swap out the screen in use for one of mine?

Udo Brand
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.
July 8, 2015

Well the question is what is on the current transition screen. You can add your field to that transition screen (and only add your validator) or replace the screen by editing the workflow-> editing the transition (and so on). But then you need to make sure the is no other validator which used a field of the old transition screen. So I would go with the first solution.

Robert Anthony July 8, 2015

Ok So I am making some headway, but this solution isn't really in line with what I need. What I would like is for the subtasks themselves to hold the fields, not in the transition screen. 

Say I click a parent issue with two subtasks. In the parent issue the two subtasks are listed below. If I click the subtask it's loaded like a standard ticket, but I cannot for the life of me figure out how I can place fields on these subtask tickets. Does that make any sense?

Udo Brand
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.
July 8, 2015

In that case add the field to your subtask Screen (make sure you have different screens for parent and subtask

David Mitchell October 6, 2015

@Robert Anthony did you ever get anywhere with this? Having a rough time trying to do the same thing. Where Is My Field tells me the field should be there, but it isn't

Suggest an answer

Log in or Sign up to answer