Skip to content

Conversation

@btpnlsl
Copy link

@btpnlsl btpnlsl commented Oct 19, 2023

#629
This change adds the safe_update and updated_stamp properties to the Ticket class to support Zendesk's protection against ticket update collisions as described in the Zendesk documentation.

These properties will only serialize into JSON when safe_update is set to TRUE.

I've added some unit tests for serialization and have performed some manual tests to validate:

  • Attempting to update a ticket with safe_update set to true can succeed.
  • Attempting to update an out-of-date ticket with safe_update set to true will result in a HTTP CONFLICT status.
  • Attempting to update an out-of-date ticket with safe_update set to false will succeed.

PierreBtz
PierreBtz previously approved these changes Nov 6, 2023
Copy link
Collaborator

@PierreBtz PierreBtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks for the contribution. I'll merge once CI is green.

@PierreBtz PierreBtz merged commit 352bb48 into cloudbees-oss:master Nov 6, 2023
@btpnlsl btpnlsl deleted the safe_update branch November 6, 2023 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants