jira-helper
jira-helper copied to clipboard
Feature: Добавить функцию удалить настройки
Необходима функция очистки настроек
- Всех
- Только WIP-лимиты персональные
- Только WIP-лимиты колонок
- Только WIP-лимиты по полям
- Только WIP-лимиты по свимлайнам
- Только для SLA
How used now
var _boardId = 6200; // <--- set ID from URL of your board extract after "rapidView="
var _props = ['subgroupsJH', 'jiraHelperSwimlaneSettings', 'jiraHelperWIPLimits', 'slaConfig3', 'settingTetrisPlaning', 'personLimitsSettings', 'fieldLimitsJH'];
function runWithNextProp() {
if (_props.length > 0) {
deleteSettingsJH(_props.pop());
return;
}
console.log('---- is Done ------');
}
function deleteSettingsJH(prop){
AJS.$.ajax({
url: `/rest/agile/1.0/board/${_boardId}/properties/${prop}v1`,
type: 'DELETE',
dataType: 'json',
success: function(){
console.log(`the ${prop} is deleted`);
runWithNextProp();
},
error: function(msg) {
console.log(`error with ${prop}`);
runWithNextProp();
}
});
}
runWithNextProp();