Forums

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

Need to auto populate linked issue field based on other custom field selection

dhamu rishi July 28, 2022

I need to auto populate Linked issues filed based on other custom field selection.

I have “is this linked issue” custom field with yes, no and none option

When yes is choosen liked issues should populate else hide

 

If it is not possible

i have added None as an option in linked issues drop down.. if none is choosen ‘issue’ field should be hidden.. I have tried with all the scripts I have..

B4AACDE1-0E25-4552-9E07-7D43932E9B79.png

1 answer

1 vote
Mark Segall
Community Champion
July 28, 2022

@dhamu rishi and welcome to the community!

Unless you're using Forms (Only available for JSM projects), being able to conditionally show/hide fields is not possible natively.

dhamu rishi August 1, 2022

Thanks @Mark Segall is there any way that we can make ‘issue’ field mandatory..when parent ‘Linked issue is mandatory even ‘issue’ has to be mandatory. This is really needed for the client.

Mark Segall
Community Champion
August 1, 2022

You could do something like this...

  1. Flag issues on issue create (automation)
  2. Add a workflow validator to prevent issues from transitioning while flagged
  3. Remove the flag once "Is This a Linked Issue" is answered (Automation)
    1. If linked issue = Yes, you can maintain the flag until a link is established

So, you're looking at 3 automation rules and a workflow validator.  Here's how it can be done (Note - I'm going with flag, but you could just as easily use a label, component, or custom field)

AUTOMATION #1 - Flag The Issue

  • TRIGGER: Issue Created
  • ACTION: Edit Issue (Flag = Impediment)

AUTOMATION #2 - Is This A Linked Issue field change

When "Is This A Linked Issue" field value changes, if answer is Yes then verify there's a linked issue.  If yes and no linked issue, log it and keep it flagged. Else, remove the flag

  • TRIGGER: Field Value Changed (Is This A Linked Issue)
  • IF CONDITION: JQL
    • key = {{issue}} AND "Is This A Linked Issue" = YES AND issueLinkType IS NOT EMPTY
    • ACTION: Log action - Linked Issue = Yes, but no linked issues
  • ELSE 
    • Is This a Linked Issue = No
    • ACTION: Edit Issue (Flag)
      • Leave Empty to clear it out

AUTOMATION #3 - Issue Linked

  • TRIGGER: Issue Linked
  • ACTION: Edit Issue (Flag)
    • Leave Empty to clear it out

VALIDATOR

  • Add a validator on your issue to prevent it from transitioning when Flagged = Impediment.

Suggest an answer

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

Atlassian Community Events