Clear value of drop down select list field from an automation rule?

Ann Rumenapp October 18, 2023

I have to write an automation rule that will clear data from 2 custom (drop down select) fields when the epic is removed from the card/issue and the cards/issues sub-tasks.  

The rule currently will update the card when an Epic is changed, but I now need to expand the rule for when the Epic is removed.

The current rule is: 

When value changes for Parent Link (Any changes to the field value; for Edit issue)

  • Issue Type is one of Story, Spike, Task, Bug, SecurityRisk, Dependency Task, Technical Debt, Improvement, Discovery, Production Support. Sub-task, In-Sprint Defect task
  • THEN edit issue fields 'project', Copy from Parent issue
  • THEN edit issue fields 'work type', copy from Parent issue
  • Branch: For JQL 'parentEpic = {{issue}}
    • THEN edit issue fields 'project', Copy from Parent issue
    • THEN edit issue fields 'work type', copy from Parent issue

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
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.
October 18, 2023

Hi @Ann Rumenapp 

To do that you would need an additional rule, using the generic Issue Updated trigger, followed by a check on the changelog to determine if the parent field was cleared.  Then you could update, as needed.

Here is some information on the changelog to help you create the advanced compare condition you will need: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--changelog--

Kind regards,
Bill

Ann Rumenapp October 18, 2023

My problem is how to clear a drop down select list field.  When I update the fields in a then condition, it makes me select one of the options and doesn't allow me to just clear the field.  Is there JSON code somewhere that does this?

Bill Sheboy
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.
October 18, 2023

If you select the multi-select field with Issue Edit and do not select any options, it will clear it.

If instead you need to remove specific values, you may want to use a JSON edit to use "remove" or:

  • expand all of the current values
  • remove the ones, as needed
  • format the result as JSON for a field update

Here is the syntax for the JSON edit: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Multi-select-custom-field

Suggest an answer

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

Atlassian Community Events