[PR #5917] [MERGED] Internal reference handling on content copying #6594

Closed
opened 2026-02-05 10:36:19 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/5917
Author: @ssddanbrown
Created: 11/25/2025
Status: Merged
Merged: 11/29/2025
Merged by: @ssddanbrown

Base: developmentHead: copy_references


📝 Commits (5)

  • f073994 Testing: Extracted copy tests to their own class
  • ba675b6 Copying: Added tests to cover copy self-references
  • 674bb84 Copying: Added reference change context tracking
  • 959981a Copying: Added logic to find & update references
  • 3cd3e73 Copying: Fixed issue with non-page links to page permalinks

📊 Changes

8 files changed (+540 additions, -283 deletions)

View changed files

📝 app/Entities/Models/Page.php (+8 -0)
📝 app/Entities/Tools/Cloner.php (+47 -4)
app/References/ReferenceChangeContext.php (+45 -0)
📝 app/References/ReferenceUpdater.php (+41 -1)
📝 tests/Entity/BookTest.php (+0 -104)
📝 tests/Entity/ChapterTest.php (+0 -83)
tests/Entity/CopyTest.php (+399 -0)
📝 tests/Entity/PageTest.php (+0 -91)

📄 Description

For #3239

Remaining Todo

  • Implement core reference change logic
  • Manual testing to double check implementation

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/5917 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 11/25/2025 **Status:** ✅ Merged **Merged:** 11/29/2025 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `copy_references` --- ### 📝 Commits (5) - [`f073994`](https://github.com/BookStackApp/BookStack/commit/f073994bc3d290d88aefca623ccdd2d2b51d5060) Testing: Extracted copy tests to their own class - [`ba675b6`](https://github.com/BookStackApp/BookStack/commit/ba675b6349f3e9fd464dba02557c33441a5e3a96) Copying: Added tests to cover copy self-references - [`674bb84`](https://github.com/BookStackApp/BookStack/commit/674bb84fac98a73820217a0a43c3fb732919899a) Copying: Added reference change context tracking - [`959981a`](https://github.com/BookStackApp/BookStack/commit/959981a676e222aa9a7a3d0f163e1a21509086f2) Copying: Added logic to find & update references - [`3cd3e73`](https://github.com/BookStackApp/BookStack/commit/3cd3e73f607dc7513c1bd7dc9d458808267eae4c) Copying: Fixed issue with non-page links to page permalinks ### 📊 Changes **8 files changed** (+540 additions, -283 deletions) <details> <summary>View changed files</summary> 📝 `app/Entities/Models/Page.php` (+8 -0) 📝 `app/Entities/Tools/Cloner.php` (+47 -4) ➕ `app/References/ReferenceChangeContext.php` (+45 -0) 📝 `app/References/ReferenceUpdater.php` (+41 -1) 📝 `tests/Entity/BookTest.php` (+0 -104) 📝 `tests/Entity/ChapterTest.php` (+0 -83) ➕ `tests/Entity/CopyTest.php` (+399 -0) 📝 `tests/Entity/PageTest.php` (+0 -91) </details> ### 📄 Description For #3239 ### Remaining Todo - [x] Implement core reference change logic - [x] Manual testing to double check implementation --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:36:19 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6594