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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,465,462
Community Members
 
Community Events
176
Community Groups

Changing Issue Type with Different Field configurations

Hi,

I  have tried to get this to work so not sure if I did something wrong or not possible?

I have an issue "Task" that will be logged to the project and follows the default field configuration.
Now working on the "task" the issue type needs to change to an "epic".

However, when changed to "epic" there needs to be a field that is now mandatory to fill out. "Epic" is associated with a different field configuration where that field is set as required. 

The only thing is that I cannot change the "task" to an "epic" when editing the issue - I assume that is because of the two different field configurations?

Is there then a way to make the field mandatory only when "epic" is chosen?

Thanks.

 

1.JPG2.png

1 answer

1 accepted

2 votes
Answer accepted

It is the different configuration.

You can use the "move" option to change the issue type, it will take you through a process of checking for data loss and filling in required fields.

Thanks @Nic Brough -Adaptavist- - I think they might find the "move" a bit too time consuming when they used to editing issues quickly on the screen itself.

Would this be possible to make the field mandatory with a behavior? I find myself stuck with the issue type and how to define that in the script properly.

This script needs some adjustment and not too sure how as it only makes the field mandatory after you have updated the ticket and I am trying to make it appear mandatory as soon as you change the issue type to "epic" without updating as yet i.e. red asterisk to appear immediately next to field...

 

def custfield = getFieldById("customfield_17914")
 
String issueType = getIssueContext().getIssueType().getName()
if (issueType == "Epic") {
custfield.setHidden(false);
custfield.setRequired(true);
}
Like Bogdan Hurtupan likes this

Yes, the "move" option is complex.  It has to be.

By changing an issue to a type with a different configuration, you are effectively making a structural change, and that process may need to ask for new data or warn you that data is going to be deleted.

In the case of converting Story-level issues to Epics, or vice versa, you cannot avoid using move - Epics have a mandatory name field, that can't be put on other issue types, and Epics can not have Epic Links.  The move process will demand a name when going from issue to Epic

To make a field mandatory, I would use field configurations - have one for non-epics, and a second for Epics.  In the Epic one, flag your field as mandatory.  This would force people using "move" to change a story to an Epic to enter something as the type changes, you don't need a Behaviour at all.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events