Java Script in web-resource not loading on Issue search and project view

Hi everyone,
I implemented a custom button that executes a JS function which calls a REST endpoint. It works fine in the normal Issue view, but not at all in the project view or the Issue search.

This is my button and the web resource in atlassian-plugin.xml:

    <web-item key="review_button" name="Reviewed" section="operations-top-level" weight="1">
        <link linkId="review-link"/>
        <styleClass>aui-button toolbar-trigger</styleClass>
        <condition class="com.tsi.otc.jira2otip.common.conditions.ReviewButtonViewable"/>

    <web-resource key="issue-resources" name="Issue Web Resources">
        <resource type="download" name="review.js" location="/js/review.js"/>

I also already tried to set the context to general like this:
<context >atl.general</context>

It still only get’s executed in issue view but not in project view or the Issue search. What am I missing?

Against my initial assumption that I was using web-item or web-resource wrong, it actually had to do with the button not being fully rendered in the project view/ issue search and therefore the click event not working. I replaced:

    var $webItem = $('#review-link');
    $ {



in my JS file. Hope it may helps someone with a similar issue.