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

[sync-actions] State setTransitions update do not work correctly #1765

Open
lojzatran opened this issue Feb 17, 2022 · 1 comment
Open

[sync-actions] State setTransitions update do not work correctly #1765

lojzatran opened this issue Feb 17, 2022 · 1 comment

Comments

@lojzatran
Copy link

Description

When I have 2 arrays of transition in State resource:

[
  {
    "typeId": "state",
    "key": "Active"
  },
  {
    "typeId": "state",
    "key": "ReminderSent"
  },
  {
    "typeId": "state",
    "key": "Cancelled"
  },
  {
    "typeId": "state",
    "key": "Paused"
  },
  {
    "typeId": "state",
    "key": "Error"
  }
]
[
  {
    "typeId": "state",
    "key": "Cancelled"
  },
  {
    "typeId": "state",
    "key": "Paused"
  },
  {
    "typeId": "state",
    "key": "Error"
  },
  {
    "typeId": "state",
    "key": "Active"
  },
  {
    "typeId": "state",
    "key": "ReminderSent"
  }
]

This would generate an update action:

[
  {
    "action": "setTransitions",
    "transitions": [
      {
        "typeId": "state",
        "key": "Active"
      },
      {
        "typeId": "state",
        "key": "ReminderSent"
      },
      {
        "typeId": "state",
        "key": "Cancelled"
      },
      {
        "typeId": "state",
        "key": "Paused"
      },
      {
        "typeId": "state",
        "key": "Error"
      }
    ]
  }
]

However, this update action would fail with this error: "statusCode":400,"status":400,"message":"'transitions' has no changes.".

In this case, sync-actions should not generate any update actions, even if the elements in the transition array changed their positions.

@lojzatran
Copy link
Author

Hi team, any changes here? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant