Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Issue collector not populating field with custom script

Matt July 21, 2021

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>

 

1 answer

1 accepted

1 vote
Answer accepted
Matt August 3, 2021

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'] 
Matthew Hillier
Contributor
August 10, 2021

Thank you!

Like Matt likes this
Matt August 12, 2021

Glad it helped!

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian community, university, on demand, transition to jira cloud

Transition to Jira Cloud

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
AUG Leaders

Upcoming Jira Events