My app processed an event from Confluence that included a property named selfGenerated. However, I cannot find any mention of this property in Forge docs. Can anyone confirm whether this is a reliable property? And if so, what is its behavior?
You can find references to it in this table: https://developer.atlassian.com/platform/forge/manifest-reference/modules/trigger/#filter-reference
Filter reference
Property Type Required Description ignoreSelfbooleanThe filterproperty must have eitherignoreSelforexpressionor both of them defined.Ignore self-generated events. For example, an app updates an issue and ignores the
avi:jira:updated:issueevent that is generated by this operation.Note that currently
ignoreSelfonly works with Jira events.|
I tested it today with this scenario: If my app uses asApp().requestJira(route`/rest/api/2/issue/${issueId}, payload) to update a work item, this results in an event with atlassianId equal to the app user and selfGenerated being false. So I currently consider this property being unreliable, which is especially disappointing, as it is not possible to retrieve the app’s user id in Jira (unlike Confluence, which provides a dedicated endpoint for that purpose).
Hello @JasonMarx ,
You can get the app’s UserId in Jira using the Myself resource (documentation).
Call Get Current User asApp and you get the accountId of the app.
GET /rest/api/3/myself
Hope that helps.
Hi @FabienLydoire,
Edit: Thank you for your remark. Finally got it to work. Still curious, why such an event is not labeled as “selfGenerated”. That would save a REST call per event.