Custom Field Description or introduce * next to custom field with RED color

satish kpavoor June 28, 2014

Hello Team,

We do have JIRA custom workflow and it does contain multiple custom fields. Now as per Atlassian making custom fields mandatory on subsequent screens are not possible except first screen i.e. Create Issue Screen. Now our business insisted us to atleast introduce * with RED color or make the custom field desciption to RED color, to make the field look like mandatory.

Because there is no support for 3rd party plug-ins we have decided not to use them. Is there a way to achieve my requirement through Javascript. Please advise

Regards, Nazim

3 answers

1 vote
Christian Czaia _Decadis AG_
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.
June 29, 2014

Hey,

check this code:

http://www.j-tricks.com/tutorials/silly-javascript-hacks-or-is-it

<script type="text/javascript">
AJS.$("#customfield_11300").parent().children('label').append('<span class="aui-icon icon-required"></span>');
</script>

You can add the code to the field description of a custom field. (Depending on the JIRA version you'Re using). Alternativly load it as a webresource module in a custom plugin

Cheers

0 votes
satish kpavoor June 29, 2014

Sorry I feel I should put more light here. The custom field has to be placed on subsequent screen not on the Create Issue screen. When we make custom field mandatory on subsequent screen, while we create issue, it asks to provide value for the custom field which is residing on different screen. Hence this is not the right stuff and I also identified thrid party plug-ins that can help me to acheive this but because support is not available for those we cannot take risk.

But as suggested by Christian Czaia I placed script and it showing me * with red color next to custom field. Thanks a lot Christian Czaia and Thanks a lot to everyone.

Vijay Khacharia
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.
June 29, 2014

yep, making field mandatory will make it mandatory everywhere.

javascript hack works well if the requirement is just to make it visible with a RED * :) Christian's solution is very well useful

0 votes
Vijay Khacharia
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.
June 29, 2014

Hi,

Yes you can have a customfield to be mandatory on any screen not just Create Issue Screen.

You have to configure the customfield to mandatory in the field configuration scheme. It will then be mandatory on every place.

If you want just the * with a RED colour, you can put this in description of the field and it will be visible on all the screens.

Vijay

Christian Czaia _Decadis AG_
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.
June 29, 2014

Maybe I didn't understand the question properly. If you want to make it madatory across the entire issue lifecycle (workflow), Vijay is right of course. Simply make the field mandatory in the field config that's associated with the issue type/project and you're done

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events