How to clear select list cascading field values in an issue.

Suzanne Cranfield February 14, 2024

I have created a custom field that is a select-list-cascading field in my project. 

I have also created an automation in which I want to empty the values in this field that are present in an issue that is being updated.

I am not a programmer and have been trying to search around for a solution but I am not getting very far. 

Basically the field at the parent level is "Co. Name" with a child value of "Discount".

I want to clear this custom field in the current issue that the automation rule is updating.

Can someone help me with the coding necessary in the advance field editing to accomplish this please? 
Thanks
Suzanne

2 answers

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.
February 14, 2024

Hi @Suzanne Cranfield 

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected.  Those will provide context for the community to offer ideas.  Thanks!

Until we see those...

In automation rules, cascading fields are updated using the advanced edit with JSON, as described here: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Cascading-select-custom-field

For example, if you want to clear the parent and child levels for a field, the JSON could be this:

{
"fields": {
"customfield_12345": { "value" : null }
}
}

Where customfield_12345 is the custom field id for your field.  Please let me know if you want help finding that value.

Kind regards,
Bill

Suzanne Cranfield February 15, 2024

Hi Bill, 

Thanks for your answer. I tried your suggestion but I got an error. 
Here is the simple rule. 
Basically when one field is updated (the trigger) I want to delete any content out of another custom field (customfield_10123) in the same issue. 
The value in the custom field could be different per issue.  
Does this help explain what I am trying to achieve? 

Thanks. 

CF_10123 rule.png

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.
February 15, 2024

That is odd, if you are using one of the built-in cascade select lists.  Would you please confirm the following:

  • What type of project are you using: company-managed or team-managed?  You may find this at the lower-left side of the page's expanding area.
  • What is the exact type of that field?  For company-managed, you may find that from the site admin functions, and for team-managed it will be in the project settings for the specific issue type.

 

Next, smart values are name, spacing, and case sensitive.  So try changing "Value" to "value".

If that does not work, I recommend following what the error states: change "value" to either "id" or "name".

 

Suzanne Cranfield February 20, 2024

Wow! The capital V was in deed the problem... I changed to "value" and it works correctly! 
Thanks so much for your help. 

 

Like Bill Sheboy likes this
0 votes
Humashankar VJ
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.
February 14, 2024

HI @Suzanne Cranfield - Have you tried manually clearing each sub-levels ?

 

Suzanne Cranfield February 15, 2024

Hi Humashankar. Yes  I can delete manually but I want to automate it for the Users. 

Suggest an answer

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

Atlassian Community Events