fix(draft): reuse the study-backed project when drafts have duplicate rows - #1544
Open
vcnainala wants to merge 2 commits into
Open
fix(draft): reuse the study-backed project when drafts have duplicate rows#1544vcnainala wants to merge 2 commits into
vcnainala wants to merge 2 commits into
Conversation
… rows Retries and concurrent process requests can leave extra empty project rows. Resolve and validate the project that already has studies, and return JSON 422 when none exist.
…time Require at least one citation in project mode, but do not fail validation when a citation has no DOI.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## development #1544 +/- ##
=================================================
+ Coverage 80.26% 80.50% +0.24%
- Complexity 4481 4488 +7
=================================================
Files 293 293
Lines 16424 16473 +49
=================================================
+ Hits 13182 13261 +79
+ Misses 3242 3212 -30
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Project::where('draft_id')->first(), which could pick an empty sibling from retries or concurrent process requests.Laravel 13 notes: constructor-injected
ProcessDraftonUploadController, explicitResponse|JsonResponsereturn types, namedprocess(project:)argument, andHasManyprojects()alongside the existinghasOneproject(). This app does not use Filament.Test plan
php artisan test --filter='ProcessDraftProjectReuseTest|ProjectValidationTest|UploadTest|ValidationModelTest|PublishProjectTest|PublishEmbargoProjectValidationTest'