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

Running AJS function every time

Mário dos Santos _TOTVS_ March 8, 2017

My code runs when AJS.toInit() loads (search for issues page), but when filter changes the page does not reload completely and my code does not run anymore.


Is there a way to solve this and leave the script running all of the time?

 

Thanks.

Mário.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Volodymyr Krupach
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.
March 8, 2017

I guess that you need NEW_CONTENT_ADDED:

JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function() {
// your code
});

If this does not work for you may try REFRESH_ISSUE_PAGE or ISSUE_REFRESHED.

Please be aware that it's better to do not depend on JIRA JavaScript as it's not documented and there is no API for developers.

Mário dos Santos _TOTVS_ March 8, 2017

Thank you @Volodymyr Krupach, NEW_CONTENT_ADDED worked fine.

Volodymyr Krupach
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.
March 9, 2017

Welcome :)

TAGS
AUG Leaders

Atlassian Community Events