Skip to content

Commit

Permalink
Removed additional servers (nicer upgrade path), built in the NZRS ov…
Browse files Browse the repository at this point in the history
…errides as standard for that Organisation.
  • Loading branch information
jlabusch committed Jan 23, 2014
1 parent aa9ef16 commit ce58690
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
4 changes: 3 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "wrms-kanban",
"version": "0.6.11",
"version": "0.6.12",
"update_url": "http://foo.wgtn.cat-it.co.nz/wrms-kanban.xml",
"description": "Generates simple Kanban boards for WRMS ticket groups",
"icons": {
Expand All @@ -14,8 +14,10 @@
"content_scripts": [
{
"matches": [
/*
"https://wrms2-uat.servers.catalyst.net.nz/wr.php*",
"https://wrms2-staging.servers.catalyst.net.nz/wr.php*",
*/
"https://wrms.catalyst.net.nz/wr.php*"
],
"css": ["css/col.css", "wrms-kanban.css"],
Expand Down
Binary file modified wrms-kanban.crx
Binary file not shown.
22 changes: 15 additions & 7 deletions wrms-kanban.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,17 +478,25 @@
tmnu.append(mk('span', ['tmnu_right']));

try{
function apply_override(stat, mname){
log.info('apply_override', stat + '->' + mname);
_.each(__category_meta, function(m){
m.statuses = _.without(m.statuses, stat);
if (m.name === mname){
m.statuses.push(stat);
}
});
}
var org = $('th.prompt:contains(Organisation)').next().text();
if (org === 'NZ Registry Services'){
apply_override('Pending QA', 'Test');
apply_override('QA Approved', 'UAT');
}
var details = $('table.wr-details').find('tr:nth-of-type(13) > td').text();
_.each(details.split(/\n/), function(line){
var override = line.match(/\[kanban:\s*([a-zA-Z ]+?)\s*->\s*([a-zA-Z ]+?)\s*\]/);
if (override){
log.info('main', override[1] + '->' + override[2]);
_.each(__category_meta, function(meta){
meta.statuses = _.without(meta.statuses, override[1]);
if (meta.name === override[2]){
meta.statuses.push(override[1]);
}
});
apply_override(override[1], override[2]);
}
});
}catch(ex){
Expand Down

0 comments on commit ce58690

Please sign in to comment.