Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, Is there any Documentation which describes how to use AnnouncementBannerPage methods?

Preethihr August 12, 2021

com.atlassian.jira.pageobjects.pages.admin

Class AnnouncementBannerPage

I am working on this, I am not getting any proper documentation or demo codes to work with this class. Please anyone reply me if you know about usage of methods in this class.

3 answers

1 accepted

0 votes
Answer accepted
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 18, 2021

HI @Preethihr ,

Thanks for the confirmation on the platform, and while this cannot be done on the cloud platform it absolutely can be done on the Data Center platform.  You can insert and use HTML/Javascript in Announcement Banner to make changes to the application front end, However as customizations are not covered under Atlassian Support Offerings we do not have much in the form of tutorials on how to do so.

So a basic example is to simply insert a script like the following using CSS or javascript as your type:

<script type="script type here">
your script here
</script>

The code you insert into the page banner will be accessed on page load and inject the script into the page, but do use caution as it is a use at your one risk option, as it can lead to page load errors, where removing the customization is required which can only be accomplished from the database in some cases, effectively locking you out of the application front end.

As noted there are some examples given in KB articles for specific use cases, for applying UI tweaks, workarounds for bugs, or for troubleshooting purposes but no detailed breakdowns or tutorials on advanced methods some examples can be found at the following links for ideas on how to get started on building out a custom banner script:

Regards,
Earl

Preethihr August 18, 2021

Thank you @Earl McCutcheon for all the hyperlinks. This will surely help me.

Like Earl McCutcheon likes this
0 votes
Daniel Ebers
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.
August 17, 2021

Hi @Preethihr

could you please be so kind and confirm if you are using

  • Jira Server
  • Jira Data Center
  • Jira Cloud

As Earl mentioned there is no possibility to achieve the desired on Cloud, however in your tags you stated you would be using Jira Cloud.
In your last reply you linked documentation to Jira Server - so it could be Community members cannot determine how to advise further because your deployment strategy (on-premise with Server or Datacenter 'OR' Cloud) is not clear.

Happy for any clarification.

Regards,
Daniel

Preethihr August 17, 2021

Hi @Daniel Ebers I am working on Jira Data Center.

Daniel Ebers
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.
August 22, 2021

Thanks for clarification. I can see Earl answered with a great and detailed follow-up which is meanwhile an accepted answer - just in case somebody else is looking for the same and reading here.

Regards,
Daniel

0 votes
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 16, 2021

Hello @Preethihr ,

Adding scripted code to the announcement banner or any Jira fields is a restricted function in the Jira Cloud platform, and only available to the data Center platform, as enabling javascript injection in the UI creates a Cross-Site Scripting (XSS) vulnerability that could allow malicious users to gain elevated permissions to the system.

Some additional details can be found in:

Regards,
Earl

Preethihr August 16, 2021

Hi @Earl McCutcheon According to Jira Documentation in link

https://docs.atlassian.com/software/jira/docs/api/7.0.9/index.html?com/atlassian/jira/pageobjects/pages/admin/AnnouncementBannerPage.html

The class AnnouncementBannerPage has methods to get and set Announcement Banners in Jira for System admins. They are not restricted for admins.

Is there any example demos of implementation of this class or any proper documentation on explaining about these?

Dave F
Contributor
December 1, 2021

Hi @Earl McCutcheon , "For more details click here" is a common inclusion in announcement text. While I understand the XSS risk, couldn't Atlassian at least provide a field to allow admins to provide their users with a single link along with the announcement text in the banner?  The field could be validated as a genuine URL and not code easily enough, and admins could then direct their users/customers to better descriptions than they can fit into the default banner size

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events