Hi,
I’ve tried to set up a webhook in atlassian-connect.json which will be filtered by project.property
. It’s not working. I’ve tried many combinations, like
project IN project.property[someProperty].someKey
or
project.property[someProperty].someKey = someValue
or
project.property[someProperty] = someValue
and many, many others various combinations. Tried almost everything, with single quotes like project.property[‘asd’] etc.
Sometimes webhook wasn’t called at all, sometimes was called every time like filter would not exist (first example I’ve pasted). Project property was set correctly, I’ve tried with many project properties which looked different and no one worked.
Webhook looked like:
"webhooks": [
{
"event": "jira:issue_updated",
"url": "/webhook-issue",
"filter": "project in project.property[someName].someKey = someListStringValue"
}
]
Please, help, and thanks for all answers.
jack
June 19, 2020, 1:28pm
2
Following filter works in our case:
"filter": "project.checklistDisabled is EMPTY or project.checklistDisabled != 'true'"
+ part of jiraEntityProperties
:
{
"keyConfigurations": [
{
"extractions": [
{
"objectName": "checklistDisabled",
"type": "string",
"alias": "checklistDisabled"
}
],
"propertyKey": "property-key"
}
],
"entityType": "project",
"key": "checklist-disabled",
"name": {
"value": "Checklist Disabled",
"i18n": "checklist.disabled"
}
}
1 Like
Here is example:
"webhooks": [
{
"event": "jira:issue_created",
"url": "/webhook/issue/created?issueId={issue.id}&projectId={project.id}",
"filter" : "project.property[settings].enabled = \"true\""
}
],
{
"key": "settings-indexing",
"name": {
"value": "settings index"
},
"entityType": "project",
"keyConfigurations": [
{
"propertyKey": "settings",
"extractions": [
{
"objectName": "enabled",
"type": "string"
}
]
}
]
}
1 Like
Tamar
November 22, 2022, 12:40pm
5
I did as you suggested but it’s not working:
"webhooks": [
{
"event": "jira:issue_created",
"filter": "issueType = project.property[config].issueType",
"url": "requirements/issue-hook",
"excludeBody": false
}
],
"jiraEntityProperties": [{
"key": "jira-project-indexing",
"name": {
"value" :"project index",
"i18n": "project.index"
},
"entityType": "project",
"keyConfigurations": [{
"propertyKey" : "config",
"extractions" : [{
"objectName" : "issueType",
"type" : "string"
}]
}]
}],
When I did this rest call: /rest/api/3/{{projectId}}/properties/config
I get the following json> {
"key": "config",
"value": {
"issueType": "Task"
}
}
However the event is triggered for each issueType and not only for Task
If I did it directly such as :
“filter”: “issueType =Task”
,
it works well - triggered only for issue of type Task.
any idea?
Thanks
Tamar
November 23, 2022, 1:15pm
6
answer my own question:
comparing two properties is not supported in JQL