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

Allow duplicating event definitions with a limit of 0 #16251

Merged
merged 3 commits into from Aug 30, 2023

Conversation

mpfz0r
Copy link
Member

@mpfz0r mpfz0r commented Aug 24, 2023

With #16035 we try to enforce a new default event limit, without breaking backwards compatibility.

The validations are making an exemption if an existing event definition is being edited which doesn't have an event limit yet (limit of 0)

Duplicating event definitions was done in the frontend, followed by creating a new one.
This makes it impossible to differentiate between copy and create in the backend.

  • Create a new /events/definitions/{definitionId}/duplicate endpoint. Which creates a copy without performing a validation.

  • Also correctly set the state for unscheduled event defintions. This got missed with Add enabled field to EventDefinitionDto #15558

Refs #16035

With #16035 we try to enforce a new default event limit,
without breaking backwards compatibility.

The validations are making an exemption if an existing
event definition is being edited which doesn't have an event limit yet
(limit of 0)

Duplicating event definitions was done in the frontend, and then
creating a new one.
This makes it impossible to differentiate between copy and create in the
backend.

 - Create a new `/events/definitions/{definitionId}/duplicate` endpoint.
   Which creates a copy without performing a validation.

 - Also correctly set the state for unscheduled event defintions.
   This got missed with #15558

Refs #16035
@mpfz0r mpfz0r requested review from kingzacko1 and a team August 24, 2023 11:12
@mpfz0r mpfz0r marked this pull request as ready for review August 24, 2023 11:13
@kodjo-anipah kodjo-anipah self-assigned this Aug 28, 2023
Copy link
Contributor

@kodjo-anipah kodjo-anipah left a comment

Choose a reason for hiding this comment

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

LGTM
image

@mpfz0r mpfz0r merged commit e4b7b5a into master Aug 30, 2023
6 checks passed
@mpfz0r mpfz0r deleted the fix-illuminate-event-definition-copy branch August 30, 2023 11:41
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.

None yet

3 participants