Assign a Feature's Project to a User Story

📘

How to apply this rule?

When a User Story is assigned to a Feature, move this User Story to the Feature's project.

912
[
  {
    "type": "source:targetprocess:EntityChanged",
    "entityTypes": [
      "UserStory"
    ],
    "modifications": {
      "created": false,
      "deleted": false,
      "updated": [
        "Feature"
      ]
    }
  },
  {
    "or": [
      {
        "and": [
          {
            "target": {
              "type": "field",
              "name": "Feature",
              "target": {
                "type": "pipelineBlockOutput"
              }
            },
            "value": null,
            "operator": {
              "type": "exists"
            }
          }
        ]
      }
    ],
    "type": "filter:Relational"
  },
  {
    "type": "action:targetprocess:UpdateEntity",
    "fields": {
      "Project": {
        "name": "Id",
        "type": "field",
        "target": {
          "name": "Project",
          "type": "field",
          "target": {
            "name": "Feature",
            "type": "field",
            "target": {
              "type": "pipelineBlockOutput"
            }
          }
        }
      }
    },
    "target": {
      "type": "pipelineBlockOutput",
      "blockAlias": "ui:source"
    }
  }
]