How to modify the Jira Service Management announcement banner outside the user interface

Still need help?

The Atlassian Community is here for you.

Ask the community

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

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.

*Except Fisheye and Crucible

Summary

This article describes how to modify the Jira Service Management announcement banner either through the database or through a private REST endpoint.

Environment

Jira 8.x

Solution

Find the list of announcement banner in the service management portal from the database along with the portal ID and project name

Postgres
select tbl.PropertyID as PropertyTextID, VP."NAME" as Portal_Name,tbl.Portal_Id as Portal_ID,pt.propertyvalue as Banner
from (select id as PropertyID,split_part(property_key,'_',2) as Portal_Id from propertyentry where property_key like '%com.atlassian.servicedesk.portal.announcement%')Tbl
join propertytext pt on pt.ID = tbl.PropertyID
join "AO_54307E_VIEWPORT" VP on VP."ID" = tbl.Portal_Id::int;

(warning) Query tested on PostgreSQL only.

Sample output:

propertytextidportal_nameportal_idbanner

12995

SITM2{"header":"Second one","message":"Second addtion"}
12983ITSM1{"header":"tester","message":"Remove the message"}

Option 1 - Modify it via REST endpoint

To modify the announcement banner corresponding to the portal of interest, try the below rest endpoint. Modify the value for "header" and "message" with the new title and message.

curl -D- -u user:pass --data '{"header":"tester","message":"Remove this message"}'  -H "Content-Type: application/json" http://localhost:8080/rest/servicedesk/1/servicedesk-data/announcement/portal/<portalID from above>

Option 2 - Modify it via database query

Alternatively, update the database based on the propertytext table ID from the above query such as below.

update propertytext set propertyvalue = '{"header":"Title","message":"I am done"}' where ID = <propertytext ID from the above query>



Last modified on Nov 4, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.