Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

It is possible to customize field values according to the issue type within the same project.

Lakshmi CH
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.
June 20, 2023

Hi Team,

Is it possible to customize field values based on the issue type within a project? It seems that using context for this purpose may not be effective, as selecting one issue type and adding values may not show the project list for another issue type. Is there a groovy script available to achieve the desired behavior?

1 answer

1 accepted

0 votes
Answer accepted
Tim Perrault
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.
June 20, 2023

Hello @Lakshmi CH 

 

Yes this is possible and using different configuration scheme contexts within the field should be the way to go about this.

 

Configuration contexts enable the custom field for that particular set of issues and each context can have its own configuration set (e.g. different default values, options).

Lakshmi CH
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.
June 20, 2023

Hi @Tim Perrault,

Project is not showing up when using a different context for another issue type.

Tim Perrault
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.
June 20, 2023

Can you show me a sceenshot of where the projects are not showing up?

Lakshmi CH
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.
June 20, 2023

Hi @Tim Perrault,

Based on the field context, I selected a specific issue type to add various values to the project. Afterward, I attempted to create a new context and select a different issue type, but the project was not visible in the project list. Please refer to the attached screenshot for more information.

projects.PNG

Tim Perrault
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.
June 20, 2023

So if you scroll down that whole list and the project doesn't show up it means possibly one of two things.

1) Your user doesn't have access or the administer permissions on the project.

2) this is a cloud instance and the project you want is a team-managed project.

Nic Brough -Adaptavist-
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.
June 20, 2023

You can't configure an issue-type context for a project more than once.

It can't work.  Given contexts:

  • Field Colour. Type: Bug.  Project: Unicorn.  Options: Red Green Blue
  • Field Colour. Type: Bug.  Project: Unicorn.  Options: Blue Yellow Cyan

Which option list would you use when creating a new issue?

Tim Perrault
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.
June 20, 2023

Right, but you could do

  • Field Colour. Type: Bug.  Project: Unicorn.  Options: Red Green Blue
  • Field Colour. Type: Issue.  Project: Unicorn.  Options: Blue Yellow Cyan

I hope I didn’t misread the question. 

Lakshmi CH
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.
June 20, 2023

Hi @Tim Perrault,

To my understanding, using the same project name for different(multiple) contexts (i.e., different issue types) is impossible. My question is,  Is it possible to assign different field values to the same field for different issue types within the same project? Please let me know if you know the process.

Nic Brough -Adaptavist-
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.
June 20, 2023

No @Tim Perrault it can't be done, it's a long-standing flaw (not bug, it's "working as intended" apparently). 

Once you have one issue-type and project context set, you can't create another.  You get exactly what @Lakshmi CH is seeing - the project disappears from the list.  You can create more issue-type contexts for a custom field, but not another project one.

Scriptrunner was mentioned - it is actually possible to write a script that can do it (on server).  But don't. 

Issues become un-editable, mostly the fields affected, but sometimes the whole thing, create can fail if you put data in more than one of the fields that have multiple context, and you can't search for data in the fields.  (All of that applies to the contexts you did with a script - the first one you create in the UI remains searchable, and usually editable)

Like # people like this
Tim Perrault
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.
June 20, 2023

@Nic Brough -Adaptavist-Yea I just went and tested it. Big egg on my face. Thanks for confirming. Learn something new everyday. I know this isn't the first time I've had an issue like this. I'm going to have to go back and see what I actually did.

Like # people like this
Nic Brough -Adaptavist-
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.
June 21, 2023

No.  No egg on your face. This is one of the weird things in Jira that most humans only learn about when we try it. 

It's mentioned in the docs and improvement requests, but by "mention", I mean "a not emphasised sentence, buried in a load of other stuff".  I'd never expect anyone to know about it unless they are an admin who has been asked to try to do it!

Like Tim Perrault likes this

Suggest an answer

Log in or Sign up to answer