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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Jira Insight attributes copied into a jira custom fields

Hello guys,

I've been searching the community for a while and I could not find a solution / a way to solve my need. I am trying to learn Groovy for Script Runner and it would take a while for me to achieve something my company is in desire need.

We are using Jira Insight asset manager plugin, and we have an insight automation that create a Jira issue. after that jira issue is created we use "Automation for jira" plugin using "On create" to locate that created issue and edit it to our needs.

Mainly I need to copy some attribute I have inside my Insight object to newly created Jira custom field.

For example attribute name "Status" copy to "customfield_1183" and so on.

Is there a simple script that I can achieve that simple task?

2 answers

Hi @Daniel Ben Eliyahu , have you successfully populated a custom field with values ​​contained in an insight attribute?

How did you solve your problem?

Hi Daniel,

It doesn't really make sense to retain 'identical' data in two fields. There is also a problem with updating the custom field when the Status in Insight changes. It might be a better idea to use the custom fields that Insight provides to surface that data in the issue. Cheers!

Hello Joshua,

Thank you for your answer, I can try and visualize the scenario for you:
We have an insight object type called "Software License" and inside it we have an object called "Zoom License", this object has attribute such as Expiry Date, Status,Quantity etc...

I have a working automation for insight that once it detects that Expiry date is close to 30 days from <today> it automatically opens u a Service Desk ticket + changes the status to "Pending Renewal". (This works perfectly)

After creating a SD issue, I am using "Automation for JIRA" plugin that detects that specific issue and ON create and it changing the customer request type of that issue (insight does not support that) and also I send an email to a certain group regarding this ticket. Inside that email I want to add my object attributes such as Expiry date, Status,quantity and more...
also not that I am using an insight customfield that insight populate using the insight built-in automation in that issue

Currently after reviewing the current issue, and using the insight custom field I have no way to get those object attribute to attach them to the mail or any other method I want.
I know that I have plenty of ways to do that using groovy but I am still an amateur regarding groovy scripting

Sorry for the long post.

 

Thank for the help guys,

Daniel.

Hi Daniel,

Both Jira Service Desk Automation and Automation for Jira are limited in what variables can be used in emails and I am unsure that you could include Insight data in an email even if that data was surfaced in the issue, but it may be possible.

You should check out the Automation for Jira documentation portal, paying special attention to Smart Values and the Send Email Action. Best of luck!

Hello Joshua,

 

I've had a lot of experience in Automation for Jira using smart values and sending automated emails.
That's why I need help creating the Groovy script to extract my object attributes and copy them into an issue using my created custom fields.

Hi Daniel,

I am not currently in a position to architect a solution for your, but can if you want to contract me or my company. Otherwise, use Insight custom fields and _{{issue.customfield_10001}}_ style Smart Values to accomplish your goal. Cheers!

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

102 views 1 7
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you