Why is only /installed triggered and not /enabled when installing a Forge on Connect app?

Hi community,

I’m currently developing a Jira Forge on Connect app (I’ve adopted my Connect App to Forge App as guided by this documentation, when I install the app via forge-cli to my site, I observe that only the /installed lifecycle hook is triggered, but not /enabled, even though both are defined in the lifecycle section of my Connect App’s descriptor like so:

"lifecycle": {
  "installed": "/rest/installed",
  "enabled": "/rest/enabled"
}

From my understanding, both should be triggered upon installation. At least, that’s how it used to behave (or so I thought). But in my logs, I only see activity on the /installed endpoint.

So my questions are:

  1. Has /enabled been deprecated, or has there been a change in how it works when installing the app using forge-cli?

  2. Under what conditions, if any, does Jira still trigger /enabled?

Thanks in advance for any insights, really appreciate any help.

1 Like

Please see limitation number 1: Limitations and differences

Out of interest, is there anything that Installed can’t do that enabled is required for, for your app?

I think it should be treated as a bug that the automatic Connect descriptor-to-manifest-converter automatically translates these Connect lifecycle events to Forge, even though they are not actually supported in Forge. These should be flagged at the time of conversion and not translated, if they are truly not going to be supported.

For example, the timing of installed and enabled events are different. The installed event is sent much earlier, and some host site functions (particularly those depending on app permissions) may not be ready at that time. The absence of this event necessitated a rearchitecture of a portion of our app to handle certain tasks on a background queue, which was far from a trivial “just replace ‘enabled’ with ‘installed’” type of change.

3 Likes

For our use case, the key difference is that with /enabled we’re able to call the Jira REST API properly, whereas with /installed that isn’t possible. That’s why /enabled was important for our app.

If there’s an alternative way to achieve the same REST API request flow using only /installed, please let me know.

1 Like

We have the same requirement. We need to set an app property on install for our connect on forge app.

For this to work correctly, we are currently relying on the /enabled event. See Current user not permitted to use Confluence error when getting app properties - #4 by danielwester as an example

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.