Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update conditionPayload properties #1351

Merged
merged 4 commits into from
Mar 11, 2024

Conversation

RidhamShah
Copy link
Collaborator

@RidhamShah RidhamShah commented Mar 8, 2024

Describe the bug
The ConditionPayload of experiment JSON on export/import contains full-object reference of Conditions and DecisionPoints. This needs to change to reference ID.

Old ConditionPayload API object return

{
      "createdAt": "2024-02-28T16:41:00.181Z",
      "updatedAt": "2024-02-28T16:41:00.181Z",
      "versionNumber": 1,
      "id": "dc72175a-55fb-40e6-98da-73a6de7744b4",
      "parentCondition": {
          "createdAt": "2024-02-28T16:41:00.181Z",
          "updatedAt": "2024-02-28T16:41:00.181Z",
          "versionNumber": 1,
          "id": "dd60067a-5258-4fde-bdd4-15860dbbf379",
          "twoCharacterId": "3U",
          "name": "",
          "description": null,
          "conditionCode": "question-hint-tutorbot",
          "assignmentWeight": 50,
          "order": 2
      },
      "decisionPoint": {
          "createdAt": "2024-02-28T16:41:00.181Z",
          "updatedAt": "2024-02-28T16:41:00.181Z",
          "versionNumber": 1,
          "id": "007ec826-93a2-40f3-822e-4c489c3280a9",
          "twoCharacterId": "V8",
          "site": "lesson-stream",
          "target": "question-hint",
          "description": "",
          "order": 1,
          "excludeIfReached": false
      },
      "payload": {
          "type": "string",
          "value": "custom-payload"
      }
}

New structure

{
    "createdAt": "2024-02-28T16:41:00.181Z",
    "updatedAt": "2024-02-28T16:41:00.181Z",
    "versionNumber": 1,
    "id": "dc72175a-55fb-40e6-98da-73a6de7744b4",
    "parentCondition": "dd60067a-5258-4fde-bdd4-15860dbbf379",
    "decisionPoint": "007ec826-93a2-40f3-822e-4c489c3280a9",
    "payload": {
        "type": "string",
        "value": "custom-payload"
    }
}

@RidhamShah RidhamShah self-assigned this Mar 8, 2024
@RidhamShah RidhamShah linked an issue Mar 8, 2024 that may be closed by this pull request
@danoswaltCL danoswaltCL merged commit b5729c0 into dev Mar 11, 2024
8 checks passed
@danoswaltCL danoswaltCL deleted the bug/fix-1339-conditionPayload-structure-change branch March 11, 2024 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ConditionPayload JSON object optimization
3 participants