Javascript in Announcement Banner will not run from internal links

I am attempting to hiding two panels from the Kanoah add-on on all issues except "Story" and "Epic".  The two panels are NOT being removed whenever I open an issue from a link inside JIRA.

The panels are being removed when:

  • Using a URL (i.e. //<hostname>/browse/ISS-123)
  • Opening an issue from a link inside JIRA and then refreshing the screen (F5)

 

I know the JS is firing every time since the "announcement-banner" remains hidden. 

 

Any guidance on a solution for consistent behavior?

&lt;script type='text/javascript'&gt;
AJS.toInit(function() {
    AJS.$("#announcement-banner").hide();
    var issueType = AJS.$.trim(AJS.$("#type-val").text());
 
    if(!(issueType == 'Story' || issueType == 'Epic'))
    {
       var panelTestKanoah = AJS.$("#test-manager-issuepanel");
       panelTestKanoah.remove();
       var panelTestRunKanoah = AJS.$("#test-manager-issue-test-run-panel");
       panelTestRunKanoah.remove();
    }
});
&lt;/script&gt;

2 answers

Any suggestion on how to have the function fire consistently?

Hey Peter,

Found you here smile

This feature has been launched on the latest version (v2.3.0) of Kanoah Tests. You can configure which issue types should display the panels or not. Check out the release notes.

screenshot_v.2.3.0_1_small.png

Hope that helps!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Fadoua M. Boualem
Published Monday in Trello

Using Trello to manage events

As a Jira power user, I was at first doubtful that Trello could benefit my workflow. Jira already uses boards (ones you can customize!), so why would I even need to use Trello?! In this post you will...

503 views 8 9
Read article

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