Forums

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

Jira Insight import - adding reference instead of replacing

Johannes
Contributor
March 4, 2021

Hello,

I am currently trying to figure out if it is possible to setup the CSV import in such a way that it does not replace already existing references instead of replacing them.

For example in Insight I have an object A which has a reference to object B. In my import file I now have a row which says that A has a reference to object C. The current behavior is that after the import A has a reference only to C.

How can it be achieved that A has a reference to B AND C after the import?

Thanks a lot.

Johannes

3 answers

1 accepted

3 votes
Answer accepted
Tessa Tuteleers
Community Champion
March 4, 2021

Hi @Johannes

You can tell the import to ignore custom fields that are empty in the import, but you can't tell them to just add to existing fields. 

How would you ever tell the system that something needs to be removed? 
An import updates the objects, as in, overwrites everything that is filled in in the import. 

So I'm sad to say you just can't. You should keep both / all values in the CSV if they all need to stay linked.

If you really need this kind of updates to the objects, I suggest diving into the API's and see if you can do what you need from there.

- Tessa 

Johannes
Contributor
March 4, 2021

Hi Tessa,

alright, that makes sense.

Thank you for the fast reply.

Johannes

Like Tessa Tuteleers likes this
Tim
Contributor
April 27, 2021

Tessa,

Just so I'm clear.  Is it possible to update an object via CSV and only update the attribute values that have changed?  This was possible when using Insight Cloud by adding a Key column to the CSV.

-tim

0 votes
Wim Abts
Contributor
October 6, 2022

Hi, 
We have the same requirement, when importing 'contacts' who have a reference to 'Contact Roles', we want the contact roles that already are present on the contact to be kept and additional roles added if not present.
I understand that this is not possible using the csv import, does anyone have another solution (script, ...) to add additional attribute values to an object?

Christian Solle October 6, 2022

Actually just a way to "add" data.

-->

For each attribute that should be "merged" I am adding an "interal_add_<Att-Name>"

as example Person hast Roles there is an "hidden" attribute "internal_add_Roles"

The Import is importing to the internal_add attribute and then I have a groovy that is running very then minutes IQL for the "possible" objects with that special fields.

And then it is merging the data.

Yeah quite complicate to explain as it is an freaky complicated and not nice at all (as just stuff will be added)

Wim Abts
Contributor
October 7, 2022

Hi @Christian Solle 

I found the same 'workaround' using an additional attribute that is filled when doing the import and than an automation to merge both.
But the code shown to merge is not working....
Can you give me the groovy script that merges the attributes so that I can build on that?

Thanks!

Workaround : https://confluence.atlassian.com/jirakb/how-to-append-additional-values-to-referenced-type-object-attribute-attributes-when-importing-data-in-insight-1115673613.html 

Christian Solle October 7, 2022

Hey,

at first the mentioned workaround was not clean working for me

and I try to prevent "on update" automations as I am importing to many data

and the automation engine is "blocked" for days and other projects can't work.

So I am using a merge script that is triggered every 10minutes and updating 120 objects

(I loved to have an IQL TOP/MAX or something)

So the script is also using a custom Insight Manager Library to wrap tons of functions and loads etc. 

I will add a "trimmed" version of my script and mentioned the original InsightManagerForScriptrunner library which you will find in the net (it is from RIADA)

So the script will not work out of the box!

https://www.file-upload.net/download-15016629/Merge_InternalAdd-Fields.groovy.html

0 votes
Christian Solle February 26, 2022

Hi,

but this scenario is quite common if you are using multiple import configurations and actually makes the data „inconsistent“ and „incorrect“

 

for example:

 

you have an object application 

with an multiple reference to systems.

one import source contains systems (a,b,c)

that have that application installed 

and the other import source fetched systems (x,y,z) that have the same application installed.

 

and of course at the end you want to see that this application is installed on system a,b,c,x,y,z

 

the remove „threahold“ logic is different 

as we can configure it to remove them after x days or syncs

 

and for the devs this is where you need to store from which import configuration the information was comming from


this actually is a major blocker for us

Suggest an answer

Log in or Sign up to answer