How to disable custom Configure Fields in Create Issue screen in Jira Server and Data Center

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

このページの内容

お困りですか?

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

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

問題

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 -->

使用方法:

  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

最終更新日 2024 年 7 月 30 日

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

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