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
<html> | |
<script> | |
alert(123) | |
</script> | |
123123 | |
</html> |
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 setFixVersion(version) { | |
var val = AJS.$("#fixVersions").val(); | |
val = val ? val : []; | |
val.push(version.id); | |
AJS.$("#fixVersions").val(val); | |
AJS.$("#fixVersions-textarea").val(version.name).blur(); | |
} | |
var versions = [ | |
{ |
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 = [ | |
{ |
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
//select | |
AJS.$('#customfield_10001').val(10002) | |
//multiselect | |
AJS.$('#customfield_10000').val([10000, 10001]) | |
//cascade select | |
AJS.$('#customfield_10002').val(10004).change() | |
AJS.$('#customfield_10002\\:1').val('10005') |
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 ($) { | |
setAssignee('admin'); | |
function setAssignee(name) { | |
var setValue = name; | |
var $field = $("#assignee"); | |
$.get(AJS.params.baseURL + "/rest/api/latest/user", { | |
username: setValue | |
}, function (data) { | |
$("#assignee-single-select").remove(); |
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
AJS.$('#resolution > option[value=10000]').remove() |
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
import com.atlassian.jira.component.ComponentAccessor | |
import com.opensymphony.workflow.InvalidInputException | |
def getCustomFieldValue(issue, Long fieldId) { | |
issue.getCustomFieldValue(ComponentAccessor.customFieldManager.getCustomFieldObject(fieldId)) | |
} | |
if (!getCustomFieldValue(issue, 10000)) { | |
throw new InvalidInputException("Please indicate the reason for the increased priority") | |
} |
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
AJS.$('#customfield_10000, label[for="customfield_10000"]').append('<span class="aui-icon icon-required"></span>'); |
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
AJS.$('#priority > option[value=1]').remove() |
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
import com.opensymphony.workflow.InvalidInputException | |
if (issue.type.id in [10000]) { | |
throw new InvalidInputException("Not valid issue type") | |
} |
NewerOlder