Riada-AB / InsightManager

A simplified wrapper for the Insight Java API
Apache License 2.0
25 stars 13 forks source link

Please obsolete this project... ScriptRunner has better native support for Insight/Assets #37

Open jechlin-adaptavist opened 1 year ago

jechlin-adaptavist commented 1 year ago

Hi,

Tech lead of ScriptRunner here.

We have better support in HAPI in ScriptRunner (https://docs.adaptavist.com/sr4js/latest/hapi/work-with-assets-insight) than what this library gives you. This was a useful library in its time but HAPI now provides better support, eg:

Assets.create('SA', 'Host') {
    setAttribute('Name', 'my host')
    setAttribute('RAM', 64_000)
}

No other imports or ComponentAccessor is necessary.

There are a few things from this library that are not implemented in HAPI, such as getting HTML representations of Assets.

If you have any questions support can help at https://productsupport.adaptavist.com/servicedesk/customer/portal/2 .

cheers, jamie

Clark2309 commented 1 year ago

Hi Jamie,

This project is much more than updating attributes. HAPI can not provide the full functionality of this class. E.g. retrieving data from attributes, moving objects to other objects types, triggering imports and way more. HAPI is great, but also needs more time than other scripts.

As long as HAPI can't provide the full functionality of this InsightManager, people still has to use it.

BR Christof

jechlin-adaptavist commented 1 year ago

Hey Christof,

Thanks so much for getting back to me.

HAPI Assets support is much more than updating attributes, there is support for creating, updating, searching (safely), adding attachments and comments etc.

moving objects to other objects types

That's an interesting requirement, we will take a look at it.

As long as HAPI can't provide the full functionality of this InsightManager, people still has to use it.

The thing is I think HAPI can do 95% of the tasks people use this lib for, which I bet is mainly creating, updating, searching.

I take your point tho - how about at least give a pointer to HAPI in the readme? If you just want to CRUD assets, then using HAPI is a lot easier than adding a lib to the classpath, sorting out the imports etc. Plus we have good editor support:

image

What about if I did a PR adding something to this effect to the readme, would you consider it?

cheers, jamie

Clark2309 commented 1 year ago

Hi Jamie, what about retrieving values from attributes? HAPI is good with updating, but retrieving data is not so easy. I think both, the InsightManager and HAPI have their ability to co-existence. I see no need to close the repo. If you want to update the readme, feel free. I do not own the project but I use the InsightManager heavily because not all is possible in HAPI and also HAPI is slower. At the moment I'm switching back from HAPI to plain groovy at some scripts. BR Christof

jechlin-adaptavist commented 1 year ago

Hey Christof,

We have support for retrieving attribute values: https://docs.adaptavist.com/sr4js/latest/hapi/work-with-assets-insight#id-.WorkwithAssetsv8.5.0-retrieve-attribute-valuesRetrievingattributevalues

It wasn't in the original release, maybe that's why you missed it.

and also HAPI is slower.

I'm really surprised to hear this... the API calls it uses is very similar to that in this repo. If you are able to provide any more info I'd love to hear more about this... probably not here though. https://productsupport.adaptavist.com/servicedesk/customer/portal/2 would be great, or to hear any other assets+hapi requirements you might have.

cheers, jamie

jechlin-adaptavist commented 1 year ago

https://github.com/Riada-AB/InsightManager/pull/38 , thanks