How to make field mandatory only in issue collector

arama mihai
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 26, 2021

 

Hello,

 

I am trying to make a field mandatory in just the issue collector. My use-case is that I have several select lists, all of them on the creation screen of an issue, but not mandatory in the creation screen of Jira, as only one of them needs to be mandatory, representing the BU from which a product comes from. 

We have one issue collector for each BU, so the issue collector specific for each BU contains just the select list people need to fill in.

Issue collector:

 

<script type="text/javascript">
window.ATL_JQ_PAGE_PROPS = $.extend(window.ATL_JQ_PAGE_PROPS, {
'c367e8cb' : {
triggerFunction: function( showCollectorDialog ) {
$('.c1').on('click', function(e){
e.preventDefault();
showCollectorDialog();
});
triggerFunction: function check_empty() {
if (document.getElementById('BU.X.AffectedProduct').value == "") {
alert("Please fill in the BU.X.AffectedProduct !");}}
}
}

 

This does not work, but also does not throw any errors. I can go ahead and submit the issue collector without receiving the "Please fill in the BU.X.AffectedProduct" message.

Please let me know your thoughts.

Thank you.

0 answers

Suggest an answer

Log in or Sign up to answer