Limit announcement banner to specific sections in JIRA

Heshan Manamperi
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.
October 18, 2016

When add announcement using JIRA announcement banner section, it will display all over the JIRA. Is it possible to limit announcement only for given sections (ex: Only for issue navigator, dashboards, particular service desk)

2 answers

1 vote
Mahesh S
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.
October 19, 2016

We do have a html container for the Announcement banner. So go ahead and utilize it using javascript. Use a similar code as given below. Here, I am checking the browser URL for dashboards or issue navigator with "secure/Dashboard" and "issues" respectively. If yes, I will display the announcement banner in the browser page.

<p style="display: none;" id="demo">Sample Announcement</p>
<script>
if ((window.location.href.indexOf("secure/Dashboard") != -1) || (window.location.href.indexOf("issues") != -1)) {
    document.getElementById("demo").style = "display: block;";
}
</script>

OR you can refer to the class name which is as "aui-layout aui-theme-default ka ajax-issue-search-and-view page-type-navigator" for issue navigator screen and disable the display.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 18, 2016

No, the whole point of the banner is that it is visible everywhere.

Suggest an answer

Log in or Sign up to answer