How to disable custom Configure Fields in Create Issue screen

アトラシアン ナレッジベース

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.

問題

During issue creation and issue edit, the "Configure Fields" button will be shown on the top right corner of the screen, as below:


Jira < 8.22

Jira > 8.22

Up to Jira 8.21.x the screen change occurs as the fields are checked or unchecked in show Custom Fields. Starting in Jira 8.22.x the changes are only applied after clicking on Apply changes.


However Jira administrators may want to prevent users to create a custom screen as although some fields may not be required (starred, so may cannot be changed), are important to be kept.  

ソリューション

To block the changes users may enter in Configure Fields, a Javascript needs to be injected in a field or banner.

The script:

<!-- Message Banner --> 
<div style="background-color: clear; border: 2px ; margin: 2px; padding: 2px; font-weight: bold; text-align: center;"> 
    <font size="3"><b>Open a <a href="https://jira.availity.com/servicedesk/customer/portal/44/group/212" target="_blank">Jira Support Request</a> or <a href="https://jira.availity.com/servicedesk/customer/portal/44/group/223" target="_blank">Tempo Support Request</a></font></b> 
</div>            
<script type="text/javascript"> 
/* this script runs on every page in jira, used for customization via javascript */  
// comment out the line below to show banner. Add content below /script tag  
// $("#announcement-banner").hide();  
function forceUIMod() {      
    // this will force all hidden fields to appear on "Create as Linked" screen   
    $(".qf-field").css("display","block");    
    // keep code light here, it runs often  
}   
    setTimeout( function() { forceUIMod(); }, 500); 
    // try to run right away  
    setInterval( function() { forceUIMod(); }, 2000); 
    // respond to DOM changes  
</script> 
<!-- Content for announcement banner  -->   
<!-- End content -->

How to use:

  1. Ensure your instance allows custom HTML or Javascript on Administration > System > General configuration > Edit Settings > "Enable HTML in field descriptions and list item values" ON
  2. Add the Javascript in a Custom field or Banner Edit information, below an example from banner:
    • Go to Administration > System  > Announcement banner and add the Script above

  3. At this point the Configure Fields Custom Fields will not change the screen.

Note this is only visual, even though not showing in interface, in database the user modification is stored. 


結果

The result can be seen as the short video below.


詳細情報



説明Information about Configure Fields on the create issue screen.
製品

Jira, Jira Service Desk, Jira Service Management

最終更新日 2022 年 6 月 10 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.