Good day!
Is it possible to configure JIRA Dashboard - Epic lists to additionally show how much time has been registered for each Epic (and all issues that are included in it)? We do register time using Tempo Timesheets. Apparently it does not provide any field that could show summarized time on Dashboard. I was also considering to use Epic SumUp which correctly shows time when Epic details are shown, however it looks like Epic SumUp fields cannot be used in JIRA Dashboard. Has anyone had similar challenge and what would be suggested solution?
Regards,
Andrzej
Hi, I am using the scriptrunner plugin and added a scripted (custom) field to the Epics.
Am I correct by understanding that with ScriptRunner you have developed some cascading update? I mean any time a new worklog is registered under Epic your macro also increase Total Time field in Epic? Thanks for helping me to sort this out!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In fact, a scripted field is a field that is "calculated" at the moment the field is shown on screen (with some good caching :-)). So there is not really a "cascading update".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any chance you for sharing the script file or quoting the inline script please? That would be very helpfull...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The script code is
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.link.IssueLinkManager
Issue epicIssue = issue
if (epicIssue.getIssueType().getName() != "Epic") {
return null
}
IssueLinkManager issueLinkManager = ComponentAccessor.getIssueLinkManager()
Long timeSpent = 0
if (epicIssue.getTimeSpent()) {
timeSpent = timeSpent + epicIssue.getTimeSpent()
}
epicIssue.getSubTaskObjects().each { subIssue ->
if (subIssue.getTimeSpent()) {
timeSpent = timeSpent + subIssue.getTimeSpent()
}
}
issueLinkManager.getOutwardLinks(epicIssue.getId()).each { epicLink ->
if (epicLink.getIssueLinkType().getName() == "Epic-Story Link") {
Issue epicLinkedIssue = epicLink.getDestinationObject()
if (epicLinkedIssue.getTimeSpent()) {
timeSpent = timeSpent + epicLinkedIssue.getTimeSpent()
epicLinkedIssue.getSubTaskObjects().each { subIssue ->
if (subIssue.getTimeSpent()) {
timeSpent = timeSpent + subIssue.getTimeSpent()
}
}
}
}
}
if (timeSpent == 0) {
timeSpent = null
}
return timeSpent
and the Script Field Template should be set to "Duration (time-tracking)"
Then you see for example in the Epic view :
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Marc!
What I can say - works like a charm. This is exactly what I needed!
Thank you very much, I owe you a beer or two!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great. Will you bring me the beer :-):-) ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Marc,
Is there a way to do this script and base it on the Estimated Story Points? We do not use the time tracking tool but want the ability to show the story points total for all linked issues for that Epic. Can you suggest something for this situation?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Trisha,
Yes, of course. Just replace the getTimeSpênt() method by a getCustomFieldValue of the appropriate field ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the script. I tried in scripted field and it gave me the time spent only when i have logged on the epic. It doesnt add the sub-task of stories to the epic.
Our hierarchy is epic -- story / task --subtasks . We log hours either in subtask for the story or in tasks for the epic. How can i get all logged time and sum it for Epic?
I need this to add to my big picture for Scaled Agile.
Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, this is exactly what the script does: sum-up all time registered on the Epic, on its sub-tasks, on the Stories/Tasks in the Epic and on their respective sub-tasks !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes, it did. It really helps. Thanks a lot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
The above code doesn't working in scriptrunner cloud, Can you please share me the script for cloud?
Thanks
Mrudula
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We are not using Cloud....
Scripts are very different...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Marc Minten (EVS) t,
Thanks for the script for this issue!
It works fine for me as well, but there is the issue that it displays the sum of logged times in seconds... :D
While this is very entertaining in a brain teasing way, do you know if there is any way to set up a conversion that changes the way the value is displayed?
Thanks in advance,
Gergely
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Never mind! We managed to solve it in house.
Thanks,
G
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here's an alternate solution:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.