Forums

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

Is the Object Deleted trigger pointless as no data emain in the object to actually do anything?

__ Jimi Wikman
Community Champion
August 28, 2025

I was hoping to be able to trigger either comments or deleting of work items connected using the object id and a custom field that have the object field stored.

As it turns out, you can't use any attributes from the deleted object, so you can't really do anything with this trigger?

This seems to be a silly way to handle object data on delete if we are supposed to be able to automate based on a deleted object, so I must miss something?

How is this trigger meant to actually work if it triggers after the deleting has happened and there is no resistance in the Asset deletion process to ensure its data is available for the automations to use it?

I was expecting a soft delete with a cron to do the hard delete later, but I guess this is not the case?

Or am I missing something obvious here?

1 answer

1 vote
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.
August 28, 2025

Hi @__ Jimi Wikman 

First thing, I am not using assets, and thus my suggestions are based on what I know about rules in general.  With that out of the way...

My understanding is much of asset object data is looked up just-in-time as the rule proceeds.  However, I wonder if there is "some" data still available in {{object}} after the object deleted triggers which can still be referenced.

 

For work items, the rule engine somehow captures the work item before / during deletion when the issue-deleted event triggers the rule.  Thus, even though it is "gone", or soon will be, many of the smart values are still available when the rule is running.  Although, one needs to be careful how they are used. 

For example, a rule with a Work Item Deleted trigger cannot use a branch on JQL, because that branch automagically adds this to the JQL: AND key != {{triggerIssue.key}}  But that will cause the rule to fail because it cannot even test that key with JQL in the rule.  Several other branch types can be used, and reference values from the deleted work item.

Perhaps the same happens for the deleted object, and you could experiment to test this by writing to the audit log.

 

Kind regards,
Bill

Marc - Devoteam
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.
August 29, 2025

Hi @__ Jimi Wikman 

@Bill Sheboy is right in his knowledge, the same applies for an Asset object.

If it's deleted, the attributes details are gone, you can reference the attributes used in the Asset you deleted.

The same applies in relation to a work item, as described.

__ Jimi Wikman
Community Champion
August 31, 2025

So this trigger is pointless?

__ Jimi Wikman
Community Champion
August 31, 2025

@Bill Sheboy As far as I can tell from my testing there are no ways to actually capture these values from assets using this trigger.

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.
August 31, 2025

Hi @__ Jimi Wikman 

Just a reminder I am not using assets, and so I was only offering something to test / check, and...

If the {{object}} from the trigger has no attributes you can access with the object deleted trigger, I am also puzzled how it could be used.  There is limited Atlassian-provided documentation on any of the asset-related automation features, and I see no examples with that trigger in the example rule library.

You could try posting the question in the developer community or pinging the Atlassian Support team for input on use cases.

Like __ Jimi Wikman likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events