Forums

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

Has anybody accomplished adding a ScriptRunner custom field on a Jira DC Issue Collector Form?

Guz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 3, 2023

Has anybody accomplished adding a ScriptRunner custom field on a Jira DC Issue Collector Form?

 

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Guz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 3, 2023

@ScriptRunner - I'm creating basic Custom fields, I'm adding to the proper screen, and even making sure it's related to the issue type, however, the custom fields are not available on my issue collector. 

Guz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 3, 2023
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 4, 2023

Which type are you looking for?  It would not make sense for Scripted fields for example - they can't have content until after you've created an issue.

Like # people like this
Guz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 6, 2023

Thanks, Nic! 

Judah
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2023

@Guz 

We use the HTML macro to display issue collector triggers and forms via Confluence pages. Are you doing the same? 

If so - you can access the custom filed by its id and add it to the form using some pretty simple JavaScript. Example: 


// === custom trigger function ===

triggerFunction : function(showCollectorDialog) {

$('#YOUR BUTTON').click(function(e) {

e.preventDefault();

showCollectorDialog();

});

},

fieldValues: {

description: ' \n\n',

customfield_15000: 'Please list any constraints, if applicable: '\n,

customfield_15602: 'Please describe: \n\n',

customfield_15605: 'Please describe: \n\n',

}

}

});

Judah
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2023

As @Nic Brough -Adaptavist- said, it wont work for scripted fields but might work for other types of SR fields. 

TAGS
AUG Leaders

Atlassian Community Events