I have a JIRA project that I created an Issue Collector for. I have the issue collector embedded in a Confluence page, and have an application link between the two.
I want to populate the field for Components when a user submits the collector. I followed the instructions from Atlassian as well as many blogs and forums to customize the script, but can't seem to figure out the problem. Currently, my script works fine with the exception of populating that field.
Am I missing something in my script? Or does it have to do with field/screen config?
<!-- Form -->
<script type="text/javascript" src="https://sncjira/s/97bf6cfc56690212cd0e6abca14560a0-T/tpu4v3/713005/6411e0087192541a09d88223fb51a6a0/2.0.31/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=3291d2db"></script>
<!-- Custom Button trigger -->
<button id="sb-button" class="popup-trigger" data-modal="modal-1">Create SB Request</button>
<script type="text/javascript">
var isIE = !!navigator.userAgent.match(/Trident/g) || !!navigator.userAgent.match(/MSIE/g);
window.ATL_JQ_PAGE_PROPS = $.extend(window.ATL_JQ_PAGE_PROPS, {
"triggerFunction": function(showCollectorDialog) {
$("#sb-button").click(function(e) {
if(isIE){
e.preventDefault();
showCollectorDialog();
}
else{
alert("This feature does not support Chrome or Edge, please switch to Internet Explorer to continue");
}
});
},
fieldValues : {
components : '12210'
}
});</script>
Resolved thanks to a local JIRA guru:
1: Component field must be included on the Create Issue screen
2: Missing brackets around component ID:
fieldValues : {
components : ['12210']
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Switch to Jira Cloud with Atlassian University! Explore new navigation, issue views, and Cloud features like team-managed projects and automation. Tailored for Data Center users & admins, these courses ensure a smooth transition. Start your journey today!
Enroll now
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.