Forums

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

How to map custom fields to components

Jonan Dsouza January 19, 2024

I want a custom field to be displayed only when a particular component is selected. Is there any way to map custom fields to a particular component only?

3 answers

1 vote
Joe Pitt
Community Champion
January 19, 2024

If you want it at creation time so the field can be filled in no. If you want it so whoever is working the issue can fill it in you can, but it will be a pain. You need to build a transition that only is available if the component is selected from a status that displays the field on the transition screen and either loops back to that status or go on to the next one. If it only needs to be filled in once that is the only place you'll need to put the transition. If it may need to be edited you'll need a transition from the other transitions. You can only put the field on the View screen. 

0 votes
Kristian Walker _Adaptavist_
Community Champion
January 22, 2024

Hi Jonson,

In Jira Cloud this could be done on the Create Screen with Behaviours any of the custom field types supported as documented here.

I hope this helps.

Regards,

Kristian

0 votes
Mary from Planyway
Atlassian Partner
January 21, 2024

Hi @Jonan Dsouza 
It's Mary from Planyway

In Jira, custom fields can be configured to appear based on certain conditions, but there is no direct, out-of-the-box feature to display a custom field only when a specific component is selected. Jira's native functionality allows you to control the visibility of custom fields based on issue types or projects, but not directly on components.

However, there are a couple of approaches you can consider:

  1. Using Jira Scripting or Automation:

    • If you are using Jira Server or Data Center, you can use a scripting add-on like Scriptrunner. With Scriptrunner, you can write a script in Groovy that hides or shows fields based on the component selected.
    • For Jira Cloud, similar functionality might be achievable through Automation rules or using other marketplace add-ons that provide scripting capabilities.
  2. Creating Different Issue Types:

    • Another workaround is to create different issue types for different components and then configure the custom fields based on these issue types. This way, when an issue is created with a specific issue type (mapped to a component), only the relevant custom fields will be shown.
  3. Instructional Text:

    • You could add a custom field to all issues but use the description of the field to instruct users to fill it out only if a specific component is selected. This approach relies on user compliance and is not automated.
  4. Explore Marketplace Add-ons:

    • There are various add-ons available in the Atlassian Marketplace that extend the functionality of Jira. Some of these add-ons might offer more granular control over how and when custom fields are displayed.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events