Hi,
I have my jira connect spring boot add on enabled per project e.g.
"jiraEntityProperties": [
{
"key": "some-key",
"name": {
"value": "Some name",
"i18n": "somekey"
},
"entityType": "project",
"keyConfigurations": [
{
"propertyKey": "myPropKey",
"extractions": [
{
"objectName": "isEnabled",
"type": "string"
}
]
}
]
so modules are defined conditionally
"jiraProjectPages": [
{
"key": "some-page",
"name": {
"value": "Addon page"
},
"url": "/my-addon-page-url",
"iconUrl": "/images/icon.png",
"weight": 1,
"conditions": [
{
"condition": "entity_property_equal_to",
"params": {
"entity": "project",
"propertyKey": "myPropKey",
"objectName": "isEnabled",
"value": "true"
}
}
]
}
],
When uninstalling add on I want to remove entity properties.
I cant do that in /uninstalled hook as its executed asynchronously and I cant authenticate as add on, since its already been uninstalled e.g
atlassianHostRestClients.authenticatedAsAddon().delete("/rest/api/2/project/" + projectId + "/properties/myPropKey")
this will give me 401 error.
Is there any way of removing entity properties on uninstallation or enabling addon per project in some different way?
Thanks,
Glib