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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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: Need count of stories under an epic

We need to make a dashboard displaying below two values

 

 

Epic Name            No of stories created under Epic   

 

Please help us to count the stories. We are not able to find any plugin so far so may be script needs to be written. Please help!

3 answers

If you have scriptrunner, just create a Scripted Field.

The script should look like

IssueLinkManager issueLinkManager = ComponentAccessor.getIssueLinkManager()

Integer stories = 0
issueLinkManager.getOutwardLinks(issue.getId()).each {epicLink ->
if (epicLink.getIssueLinkType().getName() == "Epic-Story Link") {
Issue epicLinkedIssue = epicLink.getDestinationObject()
String liIssueType = epicLinkedIssue.getIssueType().getName()
if (liIssueType == "Story") {
stories+=1
}
}
}
return stories.toDouble()
Issue epicLinkedIssue = epicLink.getDestinationObject()

epicLinkedIssue is not acceptable in code by Script runner Script field?

 

Any suggestion?

What do you mean with "...is not acceptable..." ???

While creating a Script field using Scriptrunner... its giving red indicator.

2019-05-07 09_50_41-Script Fields.jpg

Just add the line

import com.atlassian.jira.issue.Issue

at the beginning of your script ? (that's just very basic groovy knowledge …) 

0 votes

Hello,

You would need an add-on for it.

You could also use the Power Custom Fields Premium add-on:

https://marketplace.atlassian.com/apps/1210749/power-custom-fields-premium?hosting=server&tab=overview

You could create a SIL custom field with a script like this:

return size(allLinkedIssues(key, "Epic-Story Link"));

Hi,

You can also try this app - https://marketplace.atlassian.com/apps/1219429/status-progress-report-gadget-for-jira

You would need to enter JQL such as - "Epic Link" = "name of your epic" and type = story

Thanks, Raimundas... and appreciate your efforts on the creation of such a good plugin.

But 'Status & Progress Report Gadget for Jira' is only available for Cloud version not for Self-hosted server version.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...

4,462 views 5 15
Join discussion

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