Add an automatic comment when a Request is closed

📘

How to apply this rule?

When you have Reopen a Request when replied by requester rule disabled, it could be a good idea to warn Requesters that new comments should not be added to the old Requests. This is how it would look in Service Desk:

15501550 11411141
[
  {
    "type": "source:targetprocess:EntityChanged",
    "entityTypes": [
      "Request"
    ],
    "modifications": {
      "created": false,
      "deleted": false,
      "updated": [
        "EntityState"
      ]
    }
  },
  {
    "or": [
      {
        "and": [
          {
            "value": null,
            "target": {
              "name": "IsFinal",
              "type": "field",
              "target": {
                "name": "EntityState",
                "type": "field",
                "target": {
                  "type": "pipelineBlockOutput"
                }
              }
            },
            "operator": {
              "type": "is true"
            }
          },
          {
            "value": null,
            "target": {
              "name": "IsFinal",
              "type": "field",
              "target": {
                "name": "EntityState",
                "type": "field",
                "target": {
                  "name": "Previous",
                  "type": "field",
                  "target": {
                    "type": "pipelineBlockOutput"
                  }
                }
              }
            },
            "operator": {
              "type": "is false"
            }
          }
        ]
      }
    ],
    "type": "filter:Relational"
  },
  {
    "text": {
      "type": "constant",
      "value": "This Request is closed and all new comments will be ignored. If you'd like to follow up, please submit a new Request."
    },
    "type": "action:targetprocess:AddComment",
    "target": {
      "type": "pipelineBlockOutput",
      "blockAlias": "ui:source"
    }
  }
]