Forums

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

Getting Insight data into Temp

Brian Peters October 31, 2022

Hi,

I'm tasked with getting Tempo to use some data in one of our Insight objects. 

We currently have some dropdowns in Tempo whose options dynamically populate based on the value of another field.  Our current setup in Tempo uses a Scriptrunner REST Endpoint to reach out to an external database to get the needed values. 

We would like to cut out the external database and pull these values from Insight.  We have the Insight object set up and I'm in the Scriptrunner console building out logic that I intend to use in a REST Endpoint (code below).  The IQL I'm using seems to get something back (that I assume is the Insight Object?) but I can't tell how to drill down to the actual data I need.

The response I'm getting is:

com.sun.jersey.core.spi.factory.ResponseImpl@7ced1b6f

 

import com.onresolve.scriptrunner.runner.customisers.PluginModule

import com.onresolve.scriptrunner.runner.customisers.WithPlugin

import com.onresolve.scriptrunner.runner.rest.common.CustomEndpointDelegate

import com.riadalabs.jira.plugins.insight.channel.external.api.facade.IQLFacade

import groovy.transform.BaseScript

import groovy.transform.Field

import javax.ws.rs.core.Response

@WithPlugin('com.riadalabs.jira.plugins.insight') insightPlugin

@BaseScript CustomEndpointDelegate delegate



    @PluginModule IQLFacade iqlFacade

    def objects = iqlFacade.findObjects('objectTypeId = "DLO Code"')

    Response.ok(objects*.label).build()
I'm new to Insight and fairly new to Scriptrunner and Groovy.  Am I on the right track here or way off?  I'd like to be able to see the actual object so I can figure out how to access what I need with dot notation or something.  Is there a way to view the contents of the returned object rather than just a reference?
Thanks!

1 answer

1 vote
Tempo Support
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.
October 31, 2022

Hello Brian,

Thank you for contacting Tempo,

In regards to your question, we recommend to contact scriptrunner support they might have information regarding this, as for Tempo, our API page can be found here:

https://apidocs.tempo.io/

Best Regards,

Steven

Tempo Support Team

Brian Peters October 31, 2022

OK, thanks.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.

Register now
AUG Leaders

Atlassian Community Events