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

Creating and publishing a scheduled change request shows duplicate entries in the 'scheduling' tab when versioning enabled #4536

Closed
matthewelwell opened this issue Aug 23, 2024 · 1 comment · Fixed by #4551
Labels
bug Something isn't working front-end Issue related to the React Front End Dashboard

Comments

@matthewelwell
Copy link
Contributor

To reproduce:

  1. In an environment with versioning enabled, create a change request scheduled for the future
  2. Navigate to the 'Change Requests' tab and notice that there is only one change request
  3. Publish the change request
  4. Navigate to the 'Scheduling' tab and notice that there are 2 identical scheduled changes pending
@matthewelwell
Copy link
Contributor Author

I've looked into this, and the underlying cause is that there are 2 change_sets for the change request, one that is deleted and one that is not. These 2 are identical. The fact that there are 2 change sets, means that the underlying SQL is returning 2 duplicate rows.

I will look to resolve this on the back end to prevent this, however, the issue is caused by the fact that the FE is doing a PUT immediately after the POST request, as you can see in the following screenshots.

image image

In fact, from looking at the payloads, the API is doing the correct thing here. The FE is sending the PUT with the same payload as the post (i.e. it's not including the id of the version change set) so the API is deleting the one that was no longer included in the PUT request and creating a new one.

I'll still need to prevent the API from returning duplicates here to account for when multiple change sets are a valid use case but the immediate fix should be done on the FE.

@matthewelwell matthewelwell added front-end Issue related to the React Front End Dashboard bug Something isn't working labels Aug 23, 2024
@kyle-ssg kyle-ssg linked a pull request Aug 28, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working front-end Issue related to the React Front End Dashboard
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant