move object to another object type by grroovy script

Hi

how can i Move an Object  to another object type by groovy script?

i'm tired read this doc but did not mention anything about move object script.

Please help me.

 

Best Regards

2 answers

1 vote

Hi Meysam,

There is an end point for moving resources using rest, but it's quite complex, as you need to map each attribute between the object types etc. What I would recommend instead is to create an new object in that object type using the groovy script, by accessing the object you want to move, and copy the values. Then you could either delete the old object, or update it with an Status or, add an reference to the newly created object, if this would be helpful. It's worth mentioning that if you create the new object instead of moving it, it will get an new Id and Key, and any connections to JIRA issues etc, won't be transfered to the new object.

We have an script for creating an object in the examples you mentioned. 

In our API documentation at https://insight-javadoc.riada.se/insight-javadoc-5.0/ there is information on the ObjecttFacadeImpl with information on available methods that could be useful in this situation.

Also, we have some partners that can help you in the process of creating such an script. Let us know it that's the case.

It's worth mentioning that we plan to implement so that the ObjectFacade will support the move functionality. 

Best Regards
Alexander 

1 vote

Hi Meysam,

Just wanted to give you an quick update. We've actually started to implement this, so that this is doable using our Java API, I will be included in an upcoming update. At the Atlassian Marketplace, it's possible to watch the Insight add on, that way you can get an email when there has been a new release. 

Best Regards
Alexander

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Tuesday in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

118 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you