Missed Team ’24? Catch up on announcements here.

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

How to get result from custom field

Amit Anand August 14, 2020

Team,

I need to get value of custom field named as "work" depending on below data

Value of custom field work should come as PROJ if project1 have issue type as bug

Value of custom field work should come as SUP if project2 have issue type as task

Value of custom field work should come as OTH if project2 have issue type as task and project 1 have issue type blocker.

 

 

"Work " custom field should have following values(either of below)

  • PROJ
    • For project1 have issue type as bug
  • SUP
    • For project2 have issue type as task
  • OTH
    • For project2 have issue type as task
    • For project1 have issue type as bug

1 answer

0 votes
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 15, 2020

Hi @Amit Anand 

Can I confirm the need here:

  • If Project 1 has at least one bug, Work can contain "PROJ"
  • If Project 2 has at least one Task, Work can contain "SUP"
  • If Project 1 has at least one bug AND Project 2 has at least one Task, Work can contain "OTH"

Is this your need? Is the field "Work" on each project or on all projects?

--------------

Option 1: Issue Field Contexts:

Issue Field Contexts will cover some of your need if this is based on project-specific options.

You can set different drop-down options per project - so you could have different options for Project 1 vs Project 2.

You can choose for specific issue types to only have the drop-down options within a project - but it is one context per project.

To create an Issue Field Context, as a Jira Admin:

  1. Go to Jira Settings > Issues > Custom Fields
  2. Select your custom drop-down field
  3. Select the tab "Contexts", then select the hyperlink "Create, edit or delete contexts"
  4. Press "Add new context"
  5. Give the scheme a name, then choose which issue types and/or projects this will apply to - and press Add
  6. Once added, you'll see your new context - and can create new options for it

--------------

Option 2 - Automation:

If Issue Field Contexts aren't sufficient - you might be able to use an Automation rule.

This wouldn't limit the options in Work - but could reverse an option chosen based on conditions not being met.

This could be quite a detailed automation rule - can you verify the need above is correct first? If not, please provide the specifics of how the need works so I can try to build the most accurate rule :)

Ste

Amit Anand August 17, 2020

Thanks for an update!

 

In Option 1:

I can see if i have utilized "If Project 1 has at least one bug, Work can contain "PROJ"

then i can utilise same project (Project1) for OTH with same issue type

  • OTH
    • For project2 have issue type as task
    • For project1 have issue type as bug

This option wont work

I think script runner can solve this ?

 

Thanks

Amit Anand

Suggest an answer

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

Atlassian Community Events