Created
January 11, 2019 14:34
-
-
Save chuikoaleksandr/77c1d07cea13981f83fcc3de7009cf1d to your computer and use it in GitHub Desktop.
Atlasteam, Jira, plugin JsIncluder. Set component. For https://atlasteam.ru/?p=1925
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setComponent(component) { | |
var val = AJS.$("#components").val(); | |
val = val ? val : [] | |
val.push(component.id) | |
AJS.$("#components").val(val); | |
AJS.$("#components-textarea").val(component.name).blur(); | |
} | |
var components = [ | |
{ | |
id: 10000, | |
name: 'component 1' | |
}, | |
{ | |
id: 10001, | |
name: 'component 2' | |
} | |
] | |
components.forEach(function (component) { | |
setComponent(component) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment