Web panel randomly displayed or hidden

Hi,

I created an app with a web panel module in location atl.jira.view.issue.left.context:

"webPanels": [
    {
        "key": "my-example-panel",
        "url": "index.html?issueKey={issue.key}",
        "location": "atl.jira.view.issue.left.context",
        "layout": {
            "width": "100%",
            "height": "50px"
        },
        "weight": 50,
        "name": {
            "value": "My panel"
        },
        "conditions": [
            // some conditions here, but that doesn't affect it. The panel *is* available on the issue once displayed manually.
        ]
    }
]

For some reason the panel is displayed very inconsistently in the new issue view:

  • On some issues it seems to be displayed by default, whereas for others - in the same project - it first needs to be shown via the … menu below the issue title.
  • Jira seems to remember this per issue.
  • This also seems to be inconsistent for individual users.

In the old issue view the web panel is always displayed as intended.

Another problem seems to be that the weight attribute is completely ignored. Regardless of what weight I set, the web panel provided by the Canned Responses app is always displayed first, even though that one also has a specific weight defined in its atlassian-connect.json (value = 999).

I’ve also seen that the Canned Responses web panel is handled differently: It is always displayed and can’t be hidden (in the sense that you’d need to enable it again via the … dropdown menu). Instead the ‘hide’ link simply collapses it.

I want my web panel to behave exactly the same way. Why is my panel handled differently even though it has similar settings in its module definition?

Thanks,
Jens

1 Like

Hi @jens ,

I did a little playing around with this and noticed that a PUT request is sent to https://{your-tenant}/rest/api/2/issue/{issueKey}/properties/{your-app-key}-issue-left-web-panel when the panel is shown and a DELETE request to the same location is sent when it is hidden.

So, it would seem that an issue entity property is used to persist the visibility of the panel and that this is shared across users which could be explaining your perception of randomness.

This approach will no doubt be causing confusion among customers so I’ve created [ACJIRA-2350] Issue entity properties are used to store personal settings of left panel visibility - Ecosystem Jira.

Regards,
Dugald

1 Like

Thanks @dmorrow,

I suppose that explains what I’ve seen. Once ACJIRA-2350 is fixed it should behave similar for each user then, but that unfortunately doesn’t help me.

I need that panel to be displayed by default, and right now it seems that’s not possible with the new issue view unless there’s a way to set this property automatically for new issues. And that would be prevented by a fix for ACJIRA-2350 I guess …

The goal of my app is to provide some context information to our internal JSM agents (namely whether another agent is currently looking at the same ticket or not), and if they have to manually enable the panel for each issue this makes the app useless, because it involves an extra step that they’d need to think of.

Yet that Canned Responses panel is displayed all the time, so there must be a way to achieve this. Do you know what that panel is doing differently? Is there some special handling in the platform for it because it looks more like a native element rather than something provided by an app (different hide/show feature, always there, fixed position)?

Thanks,
Jens

Hi @jens ,

The Canned Responses app contributes a web panel and an Issue Content panel. I suspect you are observing the behaviour of its Issue Content panel. You can tell by introspecting the page and seeing if the iframe has a query parameter sidebar=true which should only be present for the web panel.

Regards,
Dugald

Maybe, you are looking for contentPresentConditions in jiraIssueContents

Explained by David: jiraIssueContents conditions - #2 by david.pinn

2 Likes

Hey @dmorrow and @maciej.dudziak thanks so much for your answers.
Implementing a jiraIssueContents module did the trick.
I was not aware that it would replace the web panel so I didn’t pay too much attention to that module type.
Please consider this one fixed :slight_smile:

1 Like