-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
8.0.3, 8.0.4
-
Minor
-
0
Issue Summary
This is reproducible on Data Center: yes
Steps to Reproduce
- Create an empty Software Project -> call it Rugby
- Create 2 custom fields
- Text Field (single line) -> call it potato
- Select List (single choice) -> call it cheese
- Add these custom fields to the software project
- Create an automation rule in the software project
- Create a webhook to retrieve all projects
- GET http://<jira base url>/rest/api/2/project
- Add the below log actions:
Webhook items: {{#webhookResponse.body}} id {{id}} name {{name}}, {{/}}
cheese -> field name dot value: "{{cheese.value}}", issue dot field name dot value: "{{issue.cheese.value}}", issue dot id dot value: "{{issue.customfield_11400.value}}"
- replace customfield_11400 with your own custom field
- this is just printing the values for the first custom field (cheese) which is of type Select List (single choice)
- next up are the log actions for this custom field
Webhook contains field name dot value: {{#webhookResponse.body}} {{#if(name.indexOf(cheese.value).gt(-1))}} id {{id}} name {{name}} {{/}} {{/}}
Webhook contains issue dot field name dot value: {{#webhookResponse.body}} {{#if(name.indexOf(issue.cheese.value).gt(-1))}} id {{id}} name {{name}} {{/}} {{/}}
Webhook contains issue dot field id dot value: {{#webhookResponse.body}} {{#if(name.indexOf(issue.customfield_11400.value).gt(-1))}} id {{id}} name {{name}} {{/}} {{/}}
- replace customfield_11400 with your own custom field
potato -> field name: "{{potato}}", issue dot field name: "{{issue.potato}}", issue dot id: "{{issue.customfield_11100}}"
- replace customfield_11100 with your own custom field
- this is the second custom field which is of type Text Field (single line)
- next up are the log actions for this custom field
Webhook contains field name: {{#webhookResponse.body}} {{#if(name.indexOf(potato).gt(-1))}} id {{id}} name {{name}} {{/}} {{/}}
Webhook contains issue dot field name: {{#webhookResponse.body}} {{#if(name.indexOf(issue.potato).gt(-1))}} id {{id}} name {{name}} {{/}} {{/}}
Webhook contains potato issue dot field id: {{#webhookResponse.body}} {{#if(name.indexOf(issue.customfield_11100).gt(-1))}} id {{id}} name {{name}} {{/}} {{/}}
- replace customfield_11100 with your own custom field
Webhook contains "rugby": {{#webhookResponse.body}} {{#if(equals(name, "rugby"))}} id {{id}} name {{name}} {{/}} {{/}}
Webhook contains "rugby": {{#webhookResponse.body}} {{#if(name.indexOf("rugby").gt(-1))}} id {{id}} name {{name}} {{/}} {{/}}
- And the last 2 log actions that work check the text string rugby directly
- Create a webhook to retrieve all projects
Then create an issue and populate the custom fields with a partial the name of the project and it should trigger the above automation rule and you should see the problem in the log output as per the screenshot below.
Expected Results
We expect to see results for projects that match the values of my custom fields
Actual Results
No projects are logs as nothing matches the custom fields, this is not because of the values but because the functions do not work with custom fields:
The same happens for star values, if you create a smart value in automation you will have the same result as described with custom fields.
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available
- relates to
-
AUTO-239 Comparing values in the response of a webhook request against a custom field or smart value using string functions do not work
-
- Long Term Backlog
-
- links to