Actions
Highlight my backlog » History » Revision 2
« Previous |
Revision 2/12
(diff)
| Next »
Tom Clegg, 07/11/2015 03:24 AM
Highlight my backlog¶
// ==UserScript==
// @name Highlight my redmine backlog
// @namespace https://arvados.org/projects/arvados/wiki/Highlight_my_backlog
// @version 0.1
// @description Highlights issues assigned to you in redmine Backlogs view.
// @author Tom Clegg
// @match https://arvados.org/rb/master_backlog/*
// @grant none
// ==/UserScript==
$.ajax('/my/account', {success: function(data, _, _) {
var key = $('#api-access-key',data).text();
var url = '/issues.json?assigned_to_id=me&limit=100';
var ajaxopts = {
dataType: 'json',
headers: {'X-Redmine-API-Key': key},
success: dopage
};
$.ajax(url, ajaxopts);
function dopage(data, _, _) {
for (var i=0; i<data.issues.length; i++) {
$('#story_'+data.issues[i].id).css({
//background:'#faa',
'font-weight':'bold'
});
}
if (data.total_count > data.offset + data.limit) {
$.ajax(url + '&offset=' + (data.offset + data.limit), ajaxopts);
}
}
}});
Updated by Tom Clegg over 9 years ago · 2 revisions