AP.jira.refreshIssuePage() and new navigation

I’m fairly sure (in fact I’d say 99% sure) that calling AP.jira.refreshIssuePage() used to refresh web items including reevaluating any conditions they might use to determine their visibility.

I have an “Add” menu item that shows when an entity property has a particular value, and another “Edit” menu item that shows when it has a different particular value (the effect being that only one is shown).

Until recently (as in last month or so), setting the entity property value for “edit” (via the REST API) and calling refreshIssuePage() worked as expected, hiding the “Add” menu and showing the “Edit” menu.

Now though, setting the property value and calling the refresh function leaves the “Add” menu visible and “Edit” menu hidden until a full page reload is performed.

I have a feeling this started around the time the new navigation was enabled.

Is anyone aware of a deliberate change in how the refresh issue function behaves with the new navigation. It feels like it may be a bug to me.

2 Likes

I have a feeling this started around the time the new navigation was enabled.

While we still have the option to turn off new navigation, I just re-tested with the old navigation and the same issue occurs there. So it may not be related to the new nav after all.

I still maintain that this is recent change in behaviour, so I’ll raise a ticket with some reproduction steps and have Atlassian confirm whether it is working as intended or not.

In the meantime, replacing AP.jira.refreshIssuePage() with AP.navigator.reload() is one workaround. It’s a bit less elegant, and may not work in all cases (e.g. if you’d prefer not to reset any local state in your app’s iframe due to the full page reload).