Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Does HAPI work in Asset Automations?

Bryan Spangler August 8, 2024

I remember reading somewhere (I have no idea where) that HAPI did not work in a groovy script launched in asset automation. I haven't seen anything about it in the documentation and I wanted to confirm if this was true or not. If true, would someone have an idea on how to work around that limitation?

I have a project that is strictly for some equipment maintenance with an Asset Schema attached. I want to update attributes when other attributes have been changed. i.e. when a maintenance completed date is changed the Compliance attribute is updated as well. Is this possible with HAPI and asset automation? or is there a workaround? 

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Jonny Carter
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 14, 2024

HAPI is a feature of ScriptRunner for Jira. While Asset Management does have a Groovy scripting feature, it's not part of ScriptRunner and doesn't have access to HAPI. There is an open feature request for this: https://assist.adaptavist.com/browse/SRJIRA-7060

You may be able to schedule a Script Listener to listen for Issue Updated events, though I'm not 100% sure that updates to the Compliance attribute will trigger an Issue Updated event. There is also an open feature requests to support Asset events directly: https://assist.adaptavist.com/browse/SRJIRA-7357

TAGS
AUG Leaders

Atlassian Community Events