Project deleted event for Forge apps

We have an app that sends periodic reminders for issues. But it continues to send reminders even if the related project/issue is deleted. Checking whether the app can access the issue does not work because API returns 404 due to permissions problems too.

1 Like

hi @denizoguz, thank you for reaching out.
If you could elaborate, how do you implement those reminders? It would be helpful in further investigation.
Regarding 404 response - is it the same even for existing project/issue or only for those that have been deleted?

Hi,
You can set up a periodic reminder (for example daily) on an issue as a user. Forge Scheduler triggers our app periodically and we try to retrieve the issue details before sending the reminder as the app, note that there is no current user at that stage. We use this REST API to get issue details. If you check the response section of this API, it states that:

404 Returned if the issue is not found or the user does not have permission to view it.

All apps have a user associated with them. if the app user doesn’t have access to an issue due to project configuration, you get a 404 error when you try to get an issue as the app. This is also related with [FRGE-212] - Ecosystem Jira issue. FRGE-212 is fixed recently. I haven’t tested this in detail yet. If we get a 404 response to a request with .asApp(), can we safely assume that issue does not exist? We already request “read:jira-work” permission.

Hi @denizoguz,
I did some testing and I believe the fix for FRGE-212 works as expected. Therefore, it seems to be safe to assume that response 404 for asApp request means that issue doesn’t exist.

Thanks for your help, @ljarzabek. I had created FRGE-605 for requesting “project deleted” and “issue deleted” events. These events are not required for our use case anymore.