Trying to display Timespent in "Issues in Epic" Section

Robert Pepitone February 11, 2014

I need to be able to see the time spent (in hours) on each story in the "Issues in Epic" section of an EPIC.

I tried the code below but I'm getting zeros for stories that actually have time logged against them...

<script type='text/javascript'>
AJS.$(document).ready(function() {

AJS.$('#ghx-issues-in-epic-table tr').each(function(){
console.log('Found epic table');
var row = this;
var issueKey = AJS.$(this).attr("data-issuekey");
AJS.$.getJSON(AJS.contextPath() + '/rest/api/latest/issue/' + issueKey, function(data){
console.log('Got data for - ' + issueKey);
var value = data.fields.timespent*60;
console.log('Value - ' + value);
var actions = AJS.$(row).find('td.issue_actions');
AJS.$(actions).before('<td class="nav">' + value + '</td>');
});
});

});

1 answer

0 votes
Raju Adluru
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.
April 3, 2014

Hi Robert

I have similar request, client wants to see target release in "Issues in Epic" section, where should put the above in JIRA files?( with change to custom field - target rel)

Suggest an answer

Log in or Sign up to answer