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,646,358
Community Members
 
Community Events
196
Community Groups

How to update my Insight Object with Jira custom field info in workflow Post Function

I've seen this answered a few times but I'm still unable to get this to actually change anything in Insight. 

Here is what I have in JIRA:

SQL to analyze.JPG

1. SQL Statement Requiring Analysis = 13945 // Insight Field

2. Approved SQL Status = 13909 // Jira field

3. Retired Date = 13916 // Jira field 

From the Jira workflow, I want upon transition to SQL RETIRED the Insight object to update from ACTIVE to RETIRED and for it to populate the Retired Date.

approved sql object.JPG

 

Insight attributes are:

Status; ID = 3448

Date Retired; ID = 3423

 

I've only attempted to update the STATUS field and haven't been able to get updates in Insight. No idea what I'm doing wrong here. I'm using the answer provided here: https://community.atlassian.com/t5/Marketplace-Apps-questions/Update-Insight-Object-using-Groovy-Post-Function/qaq-p/1029354

as a template but no dice.

and adding here:

Insight post function.JPG

Can someone please assist and let me know what field ids/ insight id's I should be putting where? No matter what I do I get nada

Thanks

1 answer

1 accepted

0 votes
Answer accepted
Yinon Negev
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.
Mar 22, 2019

Hi Lara.

     It seems like the postfunction is not working for you because of the Groovy Condition, which should return True or otherwise it is considered to be "False"

Tested here for a POC, the Postfunction works fine when using 3 Insight Postfunction with No Groovy condition, a Date Attribute, Select List Attribute and a Status type Attribute, and all 3 were updated accordingly.

Please test the postfunction without a Groovy condition, or add "return true" when needed (se example here)

Please feel free to reach out to us using our Support Portal if you require our assistance.

Kind regards,

Yinon

Team Riada

Thank you Yinon...not quite sure how I messed that one up! Working perfectly now.

Actually, one more question on this.

One of the fields I'm trying to update is a date field. How would I capture that in the Change value field? 

I plugged in %%CURRENT_DATETIME%% on the off chance it would work...but it did not.

You can set a date by e.g. using the ticket updated date with 

${updated}

Reference: https://confluence.atlassian.com/display/SERVICEMANAGEMENTSERVER0422/Advanced%3A+Placeholders

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events