Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuikoaleksandr/77c1d07cea13981f83fcc3de7009cf1d to your computer and use it in GitHub Desktop.
Save chuikoaleksandr/77c1d07cea13981f83fcc3de7009cf1d to your computer and use it in GitHub Desktop.
Atlasteam, Jira, plugin JsIncluder. Set component. For https://atlasteam.ru/?p=1925
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