pimcore / studio-backend-bundle

Studio Backend bundle
Other
10 stars 1 forks source link

[Notes & Events]: Change type of Note.data to array and remove the other types #196

Closed robertSt7 closed 3 months ago

mattamon commented 3 months ago

@robertSt7 could you please provide more info than the title? :)

Just as an Info. https://pimcore.com/docs/platform/Pimcore/Tools_and_Features/Notes_and_Events/ the data is described here and can look like the following e.g.

{
  "totalItems": 7,
  "items": [
    {
      "id": 237,
      "type": "erp_import",
      "cId": 83,
      "cType": "asset",
      "cPath": "/ferrari3.jpg",
      "date": 1719567725,
      "title": "changed availabilities to xyz",
      "description": "",
      "locked": true,
      "data": [
        {
          "type": "asset",
          "name": "myAsset",
          "data": {
            "id": 20,
            "path": "/Car Images/jaguar/jaguar-xk140-3-3675496.jpg",
            "type": "image"
          }
        },
        {
          "type": "document",
          "name": "myDocument",
          "data": []
        },
        {
          "type": "object",
          "name": "myObject",
          "data": {
            "id": 7,
            "path": "/Product Data/Body-Styles/2-door coupé",
            "type": "object"
          }
        },
        {
          "type": "text",
          "name": "myText",
          "data": "Some Text"
        }
      ],
      "userId": null,
      "userName": null,
      "additionalAttributes": []
    },
    {
      "id": 236,
      "type": "Type of note",
      "cId": 83,
      "cType": "asset",
      "cPath": "/ferrari3.jpg",
      "date": 1719567483,
      "title": "Title of note",
      "description": "Description of note",
      "locked": false,
      "data": [],
      "userId": null,
      "userName": null,
      "additionalAttributes": []
    },
    {
      "id": 235,
      "type": "content",
      "cId": 83,
      "cType": "asset",
      "cPath": "/ferrari3.jpg",
      "date": 1716469964,
      "title": "test",
      "description": "estset",
      "locked": false,
      "data": [],
      "userId": 2,
      "userName": "admin",
      "additionalAttributes": []
    },
    {
      "id": 233,
      "type": "Type of note",
      "cId": 83,
      "cType": "asset",
      "cPath": "/ferrari3.jpg",
      "date": 1716299988,
      "title": "Title of note",
      "description": "Description of note",
      "locked": false,
      "data": [],
      "userId": null,
      "userName": null,
      "additionalAttributes": []
    },
    {
      "id": 232,
      "type": "notice",
      "cId": 83,
      "cType": "asset",
      "cPath": "/ferrari3.jpg",
      "date": 1716298116,
      "title": "lol",
      "description": "test",
      "locked": false,
      "data": [],
      "userId": 2,
      "userName": "admin",
      "additionalAttributes": []
    },
    {
      "id": 231,
      "type": "Status update",
      "cId": 83,
      "cType": "asset",
      "cPath": "/ferrari3.jpg",
      "date": 1716297472,
      "title": "Finish Review",
      "description": "",
      "locked": true,
      "data": [],
      "userId": 2,
      "userName": "admin",
      "additionalAttributes": []
    },
    {
      "id": 230,
      "type": "Status update",
      "cId": 83,
      "cType": "asset",
      "cPath": "/ferrari3.jpg",
      "date": 1716282424,
      "title": "Start Workflow",
      "description": "",
      "locked": true,
      "data": [],
      "userId": 2,
      "userName": "admin",
      "additionalAttributes": []
    }
  ]
}
mattamon commented 3 months ago

@robertSt7 would this be enough https://github.com/pimcore/studio-backend-bundle/pull/224 already?