Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue collector script for creation issue is not properly working for field 'labels' in Confluence

jira-admin_telenor January 4, 2024

 So I created in confluence page support button to create an issue in jira. Everything is working except labels field. Script below:

<script type="text/javascript">
(function(summary, description) {

var currentUser = {
displayName: document.getElementById("currentUserName").textContent,
emailAddress: document.getElementById("currentUserEmail").textContent
};

var projectCode = 'XXX';
var components = {
   something: 'XXXXX'
};
var sprintID = 'XXXX';
var labels = {
labelValue: 'Nova'
};
var fieldValues = {
summary: 'Not Defined ...',
priority: '3',
components: [components.something],
labels: [labels.labelValue],
customfield_11801: [projectCode],
customfield_10016: [sprintID],
fullname: currentUser.displayName,
email: currentUser.emailAddress,
};

window.ATL_JQ_PAGE_PROPS = jQuery.extend(window.ATL_JQ_PAGE_PROPS, {
'7bae947c': {
triggerFunction: function(showCollectorDialog) {
jQuery('.jiraTrigger').click(function(e) {
e.preventDefault();
showCollectorDialog();
});

jQuery('#atlassian-support-request-di').click(function(e) {
fieldValues.summary = '<write your summary here>';

e.preventDefault();
showCollectorDialog();
});
},
fieldValues: fieldValues
}
});
})();
</script>

with this solution I only get labels = collector-7bae947c and there is no Nova value which I want. Can you suggest how it should be written to be able to see Nova value in newly created task?

1 answer

0 votes
jira-admin_telenor January 23, 2024

Any ideas?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.19.17
TAGS
AUG Leaders

Atlassian Community Events