Update NodeRevisionDelete:getCandidatesRevisionsByNids to only accept a single node ID

Created on 13 April 2020, over 4 years ago
Updated 7 March 2024, 9 months ago

Problem/Motivation

To support query logic changes in ✨ Add support for "Maximum number allowed" revisions per content node translation Needs review and #3094354: Delete draft revisions safely β†’ , I'm proposing to refactor NodeRevisionDelete:getCandidatesRevisionsByNids() as NodeRevisionDelete:getCandidatesRevisionsByNid() to only accept a single node id so that the query logic found within NodeRevisionDelete:getCandidatesRevisionsByNids() and use a subquery to only find translated revisions that are older than the current translation version.

Proposed resolution

This solution relies upon patch from #3127258-4: Replace CandidateNodesForm::submitForm usage of getCandidatesRevisionsByNids β†’ to remove the only usage of NodeRevisionDelete:getCandidatesRevisionsByNids() with an array of node IDs. Once removed, we can refactor NodeRevisionDelete:getCandidatesRevisionsByNids() as NodeRevisionDelete:getCandidatesRevisionsByNid() to accept a single node id.

Remaining tasks

  • Consensus
  • Patch
  • Feedback

User interface changes

None

API changes

Changes to NodeRevisionDelete interface and NodeRevisionDelete:getCandidatesRevisionsByNids().

Data model changes

None

Release notes snippet

TBD

πŸ“Œ Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jasonawant New Orleans, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024