Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Enable Script - Jira_auto_refresh_issues_list.js

Aleksandr Ganiyev January 12, 2023

Hello everyone,

I am using Jira Service Management cloud and i found script Jira_auto_refresh_issues_list.js but i dont know how can i enable this script in order to it works.
Can anyone help me.

Thanks in advance.

This script reloads the issues list every 60 seconds

jira_auto_refresh_issues_list.js
// Only on issues list
if (/^(\/issues\/)/i.test(location.pathname)) {

var AutoRefreshIssuesList = AutoRefreshIssuesList || {};

// Main function
AutoRefreshIssuesList.init = function() {

// Wait until page is loaded
AJS.toInit(function() {
// Wait for 60 seconds before calling setInterval which fires immediately
setTimeout(function() {
// Refresh table every 60 seconds
setInterval(function() {
AutoRefreshIssuesList.refresh();
}, 60000);
}, 60000);
});
};

// Refresh function - must use this to again test URL since AJAX can otherwise allow refreshes where we don't want
AutoRefreshIssuesList.refresh = function() {
if (/^(\/issues\/)/i.test(location.pathname)) {
AJS.$(".refresh-table").click();
}
}

// Fire on initial page load
AutoRefreshIssuesList.init();
}

1 answer

0 votes
Ravi Sagar _Sparxsys_
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.
January 12, 2023

Hi @Aleksandr Ganiyev 

You can't do anything with this Script. Running JS code is not allowed. What are you trying to achieve?

Ravi

Aleksandr Ganiyev January 12, 2023

Hello, Thanks for the reply

I would like to the page of Jira issue reloads every 60 seconds automatically

How can i do it?

Maybe in the advanced setting of jira service management have this option but i dont know where i can find it. 

Suggest an answer

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

Atlassian Community Events