Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Agregate Expression on Dashboard

Script Runner add-on for JIRA provides experimental feature Aggregate Expression - https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_aggregateexpression

I am curious if those results can be somehow embedded on a JIRA dashboard.

2 answers

1 accepted

2 votes
Answer accepted

There is a REST Endpoint ( rest/scriptrunner-jira/latest/jqlfunctions/aggregateResult ) built into ScriptRunner that returns the results of the aggregateExpression function. You could send a GET request to it by fetching the a URL like the following, where the jql query parameter is a URL encoded JQL statment using aggregateExpression: <your-jira-instance-base-url>/rest/scriptrunner-jira/latest/jqlfunctions/aggregateResult?jql=project%3DPROJ+and+issueFunction+in+aggregateExpression("Expr"%2C+"timespent.sum()") 

The above is equivalent to this JQL:

project=PROJ and issueFunction in aggregateExpression("Expr", "timespent.sum()")

Getting that content into a Dasbhoard is a little trickier.

One path would be to use a Dashboard gadget that could take the output and display it. You could use something free like the Universal Gadget for JIRA plugin, or write your own gadget

Another path would be to wire the results into the UI using Javascript by way of a ScriptRunner UI customization. You'd most likely need to write some JavaScript (probably saved in your script roots as a web resource). That's likely to be pretty involved, and to require a fair bit of knowledge about front-end web development.

Of note, we have a request in our backlog (SRJIRA-2104) to add Scripted Dashboard gadgets to ScriptRunner, which would constitute a third way. That said, it's not on the immediate roadmap for SR for JIRA.

Good point, thanks for advice.

Any new update on this feature ? Is there a way now of displaying the results of an aggregate expression in a dashboard ?

Not yet, but keep a watch on https://productsupport.adaptavist.com/browse/SRJIRA-2104, as we will update that issue when it is added to the sprint & worked on.

Hello - 

Is it possible somehow to show the results of an aggregateExpression on the Dashboard via HTML on the Text gadget?

 

Any thoughts?

Not out of the box, though if you'd like something like that, you should vote for https://productsupport.adaptavist.com/browse/SRJIRA-2104

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Introducing External Collaboration for Confluence

We’re excited to introduce external collaboration for Confluence, now available in early access. It is available to preview for Confluence Cloud Premium and Enterprise customers. (If you're not on ...

238 views 0 8
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