Skip to content

"Workflow pending message body" in Email type Notification cannot handle customized message body and languages other than English. #14058

Description

@mahoutukaisali

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.
  • I am NOT reporting a (potential) security vulnerability. (These should be emailed to security@ansible.com instead.)

Bug Summary

  • "Workflow pending message body" in Email type Notification only handles {{ job_metadata }}, it will be blank with customized message body. Also, this doesn't convert other languages properly in {{ job_metadata }} other than English while other message bodies are able to convert.

Cannot Approval refer to job.* because it"s not a Job?

AWX version

AWX version: 22.3.0

Select the relevant components

  • UI
  • UI (tech preview)
  • API
  • Docs
  • Collection
  • CLI
  • Other

Installation method

N/A

Modifications

no

Ansible version

No response

Operating system

No response

Web browser

No response

Steps to reproduce

Allowing with this workaround, because of a language conversion problem, I have replaced {{ job_metadata }} in Workflow pending message body as below.

The approval node "{{ approval_node_name }}" needs review. This approval node can be viewed at: {{ workflow_url }}

{{ job.name }}

However, email notifications are sent with a blank body.

Also, here are the steps to reproduce the language conversion problem.

Workflow pending message body

The approval node "{{ approval_node_name }}" has timed out. {{ workflow_url }}

{{ job_metadata }}

The above will be sent emails body as below:
`The approval node "テスト copy" needs review. This approval node can be viewed at: https://controller23/#/jobs/workflow/549

{
"id": 551,
"name": "\u30c6\u30b9\u30c8 copy", #<--- This part should be "テスト copy"
"url": "https://controller23/#/jobs/workflow/549",
"created_by": "admin",
"started": "2023-05-29T06:37:13.272462+00:00",
"finished": null,
"status": "pending",
"traceback": "",
"extra_vars": "{}"
}`

Expected results

  • Customized messages in Workflow pending message body are appropriately handled and should be written in sent emails notification.
  • Other than English languages should be handled in Workflow pending message body as the same other message bodies.

Actual results

  • Customized messages in Workflow pending message body are blank in sent emails notification.
  • garbled characters in sent emails notification.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions