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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,560,237
Community Members
 
Community Events
185
Community Groups

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?

0 votes
Joshua Sneed Contegix
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.
Aug 18, 2020

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.

Joshua Sneed Contegix
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.
Aug 19, 2020

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.

Joshua Sneed Contegix
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.
Aug 24, 2020

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
AUG Leaders

Atlassian Community Events