Forums

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

Automation Rule to Remove Object from Assets Multi-Object Attribute

Fabio Cerullo July 26, 2025

 I’m trying to build an automation rule in Jira Cloud that removes an object attribute (application) from a multi-object attribute (field type: Assets object attribute) in the Employees object type.

Context 

  • Schema: Staff

  • Object Type: Employees

  • Attribute: Applications (multi-object, references the Applications object type)

  • We already have a working rule that adds applications using a structure like:

Now, I want to remove a specific Application (e.g., APP-17) from an employee’s list of Applications when a sub-task is created (used for access revocation).

What I Tried 

  1. Using variables allApps, filteredApps and appToRemove:

appToRemove

{{issue.customfield_10629.key}}

allApps

{{object.Applications.key.join(",")}}

filteredApps

{{allApps.replace(", ",",")
.replace("[","")
.replace("]","")
.replace(appToRemove, "")
.replace(",,", ",")
.trim(",")}}

  1. Then passing it into the Edit Object action like this:

[ {{#filteredApps}} { "key": "{{.}}" }{{^last}},{{/}} {{/filteredApps}} ]

But it doesn't work.. any help is appreciated.

Fabio

 

1 answer

2 votes
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.
July 26, 2025

Hi @Fabio Cerullo 

Without seeing your complete rule and the audit log details...

Have you tried writing to the log the incremental pieces of that smart value expression, confirming each step parses as you expect?  For example:

appToRemove: >>{{appToRemove}}<<

allApps: >>{{allApps}}<<

filteredApps: >>{{filteredApps}}<<


And then the pieces of the parsing:

allApps.replace(", ",","): >>{{allApps.replace(", ",",")}}<<

allApps.replace(", ",",").replace("[",""): >>{{allApps.replace(", ",",").replace("[","")}}<<

...

Please note the extra >> and << characters to help confirm the exact contents.

 

Also, as the allApps variable apparently contains a nested list (which is why you are removing the square brackets), perhaps try adding the flatten function instead:

  • action: create variable
    • name: allApps
    • smart value: 
{{object.Applications.key.flatten.join(",")}}

 

Kind regards,
Bill

Fabio Cerullo July 26, 2025

Hi Bill,

thanks for your answer.. here is the output of the action log:

allApps: STAF-17,STAF-16 >> {{object.Applications.key.join(",")}} <<

appToRemove: STAF-17 >> {{issue.customfield_10629.key}} <<

Final:

The following Edit Object action wipes all contents but I would like to just remove a single app.

{{allApps.replace(", ",",").replace("[","").replace("]","").replace(appToRemove, "").replace(",,", ",").trim(",").split(",").distinct}}

By the way, I'm not using nested lists as per above example.

Any pointers are appreciated.

Thanks

Fabio

Like John Funk likes this

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