Forums

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

delete Insight Object in post function

Xavier
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.
September 17, 2018

Hi all,

 

is there a way to delete an Insight Object by script (scriptrunner, insight post function, jira post function...).

In post function, we have the choice to create an Insight Object, but not to delete..

 

Thanks in advance.
Regards

2 answers

1 accepted

1 vote
Answer accepted
Xavier
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.
September 17, 2018

Hello,

 

seems possible like this

import com.atlassian.jira.component.ComponentAccessor;

/* The object facade class */
Class objectFacadeClass = ComponentAccessor.getPluginAccessor().getClassLoader().findClass("com.riadalabs.jira.plugins.insight.channel.external.api.facade.ObjectFacade");

/* The reference to the object facade which you can use in your code */
def objectFacade = ComponentAccessor.getOSGiComponentInstanceOfType(objectFacadeClass);

objectFacade.deleteObjectBean(objectFacade.loadObjectBean("ObjectKey").getId());

Jnr November 4, 2021

Ugly, but it works :) Thanks!

0 votes
Nader Nassif
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.
September 17, 2018

Hi Xavier,

Currently this feature is not implemented out of the box in Insight. 

I would like to recommend you to visit https://jira.riada.se which is Insight open ticket system for feature requests and verified bugs. You can view, watch, vote etc for issues reported by anyone.

If you can't find an already opened feature request for this, feel free to create a new one.

Cheers!

Nader

Xavier
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.
September 18, 2018

Hi Nader,

thanks for your feedback.
I finally found a way to delete the object.

Regards,

Suggest an answer

Log in or Sign up to answer