Refresh issue on change


I have entered the following code in the "Announcement Banner".

<script type="text/javascript">
AJS.$(document).ready(function () {
var issueKey = AJS.$("#key-val");
if (issueKey) {
var myProject= issueKey.text().split("-")[0];
// console.log("alt:"+AJS.$("#key-val .toggle-title").text())
if(myProject == "TPROJ"){
AJS.$("#create-subtask").text("Create Action Plan");
AJS.$("#view-subtasks_heading .toggle-title").text("Action Plan");


My intention with code is the following:

1. Change the Sub-Task header to "Action Plan" and

2. Change the "Create Sub-Task"-Action to "Creat Action Plan"

only for one specific project.

This works fine.

My problem is i need to refresh my issue manuelly, any time i create a sub-task, because the header is changed to "Sub-Task" and the action "Create Sub-Task" is also change to its previous name.

I am looking for a ways, to do the refresh the issue after any changes are entered in the issue.

Can any-way help. Thanx in advance.

1 answer

1 accepted

JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) {    
// your code here

If you put your code in there it will always be executed as soon as jira loads new content.

Thanx Nikola. I works fine.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,794 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot