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

[OMP] Deleting a series deletes related publications #8795

Closed
jonasraoni opened this issue Mar 13, 2023 · 6 comments
Closed

[OMP] Deleting a series deletes related publications #8795

jonasraoni opened this issue Mar 13, 2023 · 6 comments
Assignees
Labels
Bug:2:Moderate A bug that is causing problems for a substantial minority of users.

Comments

@jonasraoni
Copy link
Contributor

jonasraoni commented Mar 13, 2023

Describe the bug
If you remove a series that have a submission assigned, the submission will lose its publication and disappear from the list of submissions.

⚠ It's definitely needed to check if other applications are affected, and probably review our foreign keys (we can add restrict rules or if to go cascade all the way down, then software locks must be placed at strategic points).

To Reproduce

  1. Create a series
  2. Assign a submission to it
  3. Remove the series

What application are you using?
OMP 3.4.0rc1

@jonasraoni jonasraoni added this to the 3.4.0rc1 Internal Testing milestone Mar 13, 2023
@touhidurabir
Copy link
Member

I believe the right behaviour for this is not to allow a series to get deleted if it has any submission associated with it like what we have for OJS(association of submission with section) .

CleanShot 2023-03-14 at 17 41 26@2x

@jonasraoni
Copy link
Contributor Author

Yep, this is the behavior that I saw in another similar form, so I think it's ok to follow the pattern.

Something better would be to offer a new field, to allow the user select a "redirection" (e.g. move all submissions to section X before deleting this one).

@touhidurabir
Copy link
Member

@asmecher PR to review

omp --> pkp/omp#1367

@asmecher
Copy link
Member

@touhidurabir, looks good, but can you also change the ON DELETE CASCADE condition on the foreign key to a set null? (See classes/migration/install/OMPMigration.php and classes/migration/upgrade/v3_4_0/I6093_AddForeignKeys.php where they set up the publications_series_id foreign key constraint.)

touhidurabir added a commit to touhidurabir/omp that referenced this issue Mar 15, 2023
@touhidurabir touhidurabir added the Bug:2:Moderate A bug that is causing problems for a substantial minority of users. label Mar 15, 2023
touhidurabir added a commit to touhidurabir/omp that referenced this issue Mar 17, 2023
touhidurabir added a commit to touhidurabir/omp that referenced this issue Mar 17, 2023
@touhidurabir
Copy link
Member

@asmecher I have rebased the PR, should be good to merge .

asmecher pushed a commit to pkp/omp that referenced this issue Mar 17, 2023
asmecher pushed a commit to pkp/omp that referenced this issue Mar 17, 2023
@asmecher
Copy link
Member

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug:2:Moderate A bug that is causing problems for a substantial minority of users.
Projects
None yet
Development

No branches or pull requests

3 participants