Lifecycle events in case of site rename and major changes

Hello community,

We would be happy if someone clarify for us the behavior of life cycle events:
https://developer.atlassian.com/cloud/jira/platform/connect-app-descriptor/#lifecycle

When a user installs an app from the marketplace the following events are fired:

  • INSTALLED
  • ENABLED
    In this case the app is ENABLED and the user is ready to use the app.

When a user uninstalls an app the following events are fired:

  • DISABLED
  • UNINSTALLED
    In this case the app is UNINSTALLED and the user cannot use the app.

Case 1: Site rename
This blog post says that the INSTALLED event is fired when a user renames its site and the
app will be notified with the new base URL:

  • In this case the app is INSTALLED and no ENABLED event is fired. Is it the normal behaviour?
  • What should the user see in this case?
  • A working app like in the ENABLED case?

Case 2: Change in the AC descriptor
What happens if there is a major or minor change in the Atlassian Connect descriptor file?
https://developer.atlassian.com/platform/marketplace/upgrading-and-versioning-cloud-apps/

  • Which events are fired automatically by the marketplace and when?
  • Which events are fired when the user approves manually the changes?
  • How should work the app if the user does not approve the changes manually?

Thank you!

1 Like

Hi @attila.bordas ,

Let me answer your questions here about Case 1:
Q : In this case the app is INSTALLED and no ENABLED event is fired. Is it the normal behaviour?

A : Yes, this is the normal behaviour. The installed endpoint is used to send information on the site rename event and the app remains enabled

Q : What should the user see in this case?

A : If any logic is required by the app for site renames, please configure it using the INSTALLED event. In general, we do not expect the user to see anything unusual or even to be aware of this operation. The app will continue to work as normal.

Q: A working app like in the ENABLED case?

A : Yes, this is correct.

For context and a bit of history, the ENABLED and DISABLED lifecycle events were associated with the ability to enable and disable the apps via the UI. The option in the UI has now been removed but, in case of a app installation both INSTALLED and ENABLED will be fired at the same time. In a similar way both DISABLED and UNISTALLED events are fired when the app is uninstalled. In case of a site rename though, just the INSTALLED will be sent.

About Case 2:
Let me know if you are still looking for those answers and I can try to get a team member to help.

Thank you,
Caterina

1 Like

Hello Caterina,

Thank you for your answer!

We definitely interested in case 2 as well. It is not clear to us when and what events are triggered in case of major version changes.

Hi @attila.bordas ,

Here are the answers to the Case 2 questions:

Q: Which events are fired automatically by the marketplace and when?
A: Each site, approximately every 6 hours, checks the marketplace for new app versions. If the app version does not require manual approval (i.e. it has no change in scopes), it is installed automatically and the INSTALLED event is sent.

Q: Which events are fired when the user approves manually the changes?
A: if the new app version requires a manual approval, the user approval triggers an installation and the INSTALLED event is sent.

Q: How should work the app if the user does not approve the changes manually?
A: For changes requiring approval and until an approval is not granted, no installation will occur and therefore the INSTALLED event will not be fired.

Thanks,
Caterina

1 Like

Hello Kate,

Thank you for your helpful answer! This will be enough for us.

1 Like

Thank you @attila.bordas for confirming that.

And also for marking the answers as accepted.

Have a good one!