Change Issue Type with different field configurations

Barbara Teuschler May 15, 2018

Hi,

we have a project where we use the Issue Types Bug, Feature and Task. We have a common workflow for all those Issue Types but have the requirement that we need to have one field required for Bug.
I created a new Field Configuration for Bug and assigned it - this works as expected (whenever a issue is created or edited the required field must be filled out).

However an inline Issue Type change for an Issue is not possible anymore.
E.g.: I clone a Bug issue and just change the Issue Type to Task (inline).

I know that with "Move" we could move the issue to the issue type we want but we don't want users to have access to the move functionality (currently only admins do).

Is there another I can set this up, so that changing the Issue Type is possible for the users?

Thanks in advance for your help.

Best regards,
Barbara

2 answers

1 accepted

0 votes
Answer accepted
Alexey Matveev
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.
May 15, 2018

You can have single screen scheme for all issue types but you would need Power Scripts Live Fields or ScriptRunner behaviours to hide a custom field depending on the Issue type.

Barbara Teuschler May 15, 2018

Hi Alexey,

Could you please elaborate?

Can I use Script Runner to make a field required for a specific issue type without touching the Field configuration?

Alexey Matveev
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.
May 15, 2018

Yes, you can use scriptrunner to make a field required for an issue type. You can either use behaviours or validators.

If you use a validator, you would add a validator to the create transition. In this validator you would check issue type and if it is a Bug, you would check if the required field is set with a value.

Alexey Matveev
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.
May 15, 2018

But It could be done out of the box. You should create a field scheme configuration for the Bug issue type and set there the custom field required. 

https://confluence.atlassian.com/adminjiracloud/changing-a-field-configuration-844500798.html

Barbara Teuschler May 25, 2018

Hi Alexey,

I already created a new field config for the bug type - I also added it to the field configuration scheme (for issue type bug) but since I did that, I'm unable to change the Issue Type of an Issue (Inline, with "Move" however I can change the type...).

Did I miss something?

Alexey Matveev
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.
May 25, 2018

No, you did not miss anything. That is right. You can change the issue type of an issue in the Edit screen, only if all schemes for the issue types are the same. It is not in your case. Now you can only use the Move menu option to change the issue type of an issue. If you use behaviour or live fields, you do not need to create different schemes.

0 votes
Mitchell Davison [EY] May 15, 2018

Hi Barbara,

Is the field that you’ve made mandatory for Bugs visible on the other issue types? The restriction here is due to the different Field Configuration that you’re using for these different Issue Types. It may allow you to change the Issue Type if a value is set in the field, even though it’s not mandatory.

Barbara Teuschler May 15, 2018

Hi Mitchell,

Yes the field is visible in all other issue types.

I just tried inserting a value and trying to change the type - it doesn't work.

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.
May 16, 2018

I'm afraid filling fields won't help.  

You have to make the configuration for the two issue types you wish to switch between identical - using the same workflows and field configurations.

Senthilkumar October 9, 2019

Hi Nic,

 

I have a created a required for an Issue type story and its working fine. But below is the issue i face

  1. Create story with all the details. Include acceptance criteria and Story points.
  2. Move the story into epic and fill the epic details.

Note that after the successful move the epic has the acceptance criteria and Story points..

My question is, when i dint have EPIC Issue type to have the Required filed, Why i am getting the filed here when i move the ticket.


is this normal or an issue which can fixed?

 

Thanks in advance.

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 9, 2019

Because moving an issue keeps fields unless they are specifically excluded from the issue type you change it to.

Only "custom field context" matters here, field configurations and screens will not destroy the data if they're not set to show a field (they can hide it, but they won't destroy it)

senthilkumarn October 9, 2019

Thanks Nic,

 

What you mean by Only "custom field context" matters here?

 

Senthil.

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 9, 2019

This one is hard to explain, so I'll try a worked example.

Imagine

  • You have a field called "Dave", which takes strings
  • Dave should appear on (issue type) Bugs, but not on (issue type) Features.
  • You have a Bug with Dave set to "mydata"
  • You're going to change the Bug to a Feature

Now, there are three rules for a field to appear

  • It must be on the screen for the bug.  A screen just shows fields, whether there is data for it or not
  • It must have a field configuration that does not hide the field for bugs.  The hide flag just hides data, whether the data is there or not
  • The custom field context (in admin -> issues -> custom fields) must say Dave is valid for Bugs.  This determines if a field is valid for an issue type.  If it is valid, there is somewhere for the data, if it is not, the field does not apply to the issue and cannot be stored on it.

Now, you decide to move from Bug to Feature.  If Features:

  • Don't have Dave on screen, you won't see it, but "mydata" is still there in a non-visible field.
  • Have Dave hidden, you won't see it, but "mydata" is still there, just hidden
  • Does not have context for Dave, then Jira will have to destroy "mydata" because there is nowhere for it to be on the issue

Does that help?

senthilkumarn October 10, 2019

First I would like to thank you for replying me, Its Honor to get an reply from you. I know how strong you are in JIRA and helpful for all the people who need help in JIRA.

So you mean to say, we should not have Dave on any screens, so when we select move  from Bug Issue Type to Features Issue type, then Dave wont get displayed.

Since we don,t have that field on any screens.


I am not expert in JIRA and i know you are GURU in JIRA. Is this possible? and will it be worth on working on this, and will be useful in real time scenario? 

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 10, 2019

Yes, if Dave is not on the screens in use, then Dave will not appear!

Suggest an answer

Log in or Sign up to answer