Skip to content

Commit

Permalink
US#178884 Move obsolete in main TP mashups here
Browse files Browse the repository at this point in the history
These mashups are replaced by Visual Encoding feature (https://www.targetprocess.com/guide/settings/visual-encoding/) starting from 3.7.0,
so move them here to allow use them by old TP clients.
  • Loading branch information
tsarevichdm committed Apr 3, 2018
1 parent 896a363 commit 6622e3b
Show file tree
Hide file tree
Showing 16 changed files with 942 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Board Classes Of Services/BoardClassOfServices.baseinfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ShortDescription": "This mashup will set a color for a card based on Tags, States or Business Values (Priorities).",
"CompatibleTpVersion": {
"Minimum": "3.8.0"
}
}
1 change: 1 addition & 0 deletions Board Classes Of Services/BoardClassOfServices.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Placeholders:restui_board
80 changes: 80 additions & 0 deletions Board Classes Of Services/BoardClassOfServices.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
tau.mashups
.addModule('BoardClassOfServices.config', function() {

'use strict';

return {
// type of background; if 'single', first match rule color will be applied as background,
// if 'gradient', all colors from all found rules will be applied as gradient background */
colorType: 'gradient', // gradient | single

// set matching from types to values of field to background color
// use string representation of non-string values, i.e. 'true' instead of true
// use match function to special check of field
colors: {
Assignable: {
tags: {
'regression': '#ffe1b3',
'performance': '#e2eece'
},

entityState: {
name: {
'done': '#dae0e8',
'closed': '#dae0e8',
'in progress': '#fdfadb'
},
isFinal: {
'true': '#ff5400'
}
},

priority: {
name: {
'urgent': '#dae0e8',
'when have time': '#a1d9d6'
}
},

// leave empty config to have access in `match` function
project: {
process: {
name: {}
}
},

customFields: [{
match: function(customField) {
return customField.name === 'document' && customField.type.toLowerCase() === 'checkbox';
},
value: {
'true': '#e2e2e2'
}
}, {
match: function(customField) {
return customField.name === 'hasTests';
},
value: {
'no': '#ff0000'
}
}, {
match: function(customField, data) {
return data.project && data.project.process && data.project.process.name === 'Scrum' &&
customField.name === 'areYouSure';
},
value: {
'sure': '#ff0000'
}
}]
},

Bug: {
severity: {
name: {
'Critical': '#ff5400'
}
}
}
}
};
});
Loading

0 comments on commit 6622e3b

Please sign in to comment.