diff --git a/javascripts/theme.js b/javascripts/theme.js index 69360c3..75a1dae 100644 --- a/javascripts/theme.js +++ b/javascripts/theme.js @@ -154,6 +154,34 @@ $(function() { } }); + if ($('.controller-issues.action-show a.overview').length) { + var project_name = $('a.overview').attr('href').split('/')[2]; + var issue_no = $('.icon-edit[accesskey=e]').attr('href').split('/')[2]; + $.ajax({ + url: 'https://jenkins2.entrouvert.org/job/' + project_name + '-wip/api/json', + async: true, + dataType: 'json', + crossDomain: true, + success: function(data) { + $(data.jobs).each(function(idx, job) { + if (job.name.indexOf('wip%2F' + issue_no) == 0) { + $.ajax({ + url: job.url + 'lastBuild/api/json', + async: true, + dataType: 'json', + crossDomain: true, + success: function(data) { + var date = new Date(data.timestamp); + var $jenkins_link = $('