-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
SF-3240 Fix crashes when a draft book has an invalid book id #3062
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3062 +/- ##
=======================================
Coverage 82.78% 82.78%
=======================================
Files 563 563
Lines 32528 32528
Branches 5271 5293 +22
=======================================
Hits 26929 26929
+ Misses 4822 4810 -12
- Partials 777 789 +12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
For testing, I'm going to start the draft, per steps, and let it run overnight. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR fixes crashes that occur when a draft book has an invalid book id by ensuring that the correct stylesheet for the book is used during conversion.
- Updated the GetBookText and GetDeltaFromUsfm methods in ParatextService to pass scrText.ScrStylesheet(bookNum) instead of the book number
- Added two new tests to validate the behavior when a variant book id is used in USFM to USX conversions
Reviewed Changes
File | Description |
---|---|
test/SIL.XForge.Scripture.Tests/Services/ParatextServiceTests.cs | Adds tests for override behavior with variant book ids in GetBookText and GetDeltaFromUsfmAsync methods |
src/SIL.XForge.Scripture/Services/ParatextService.cs | Updates method calls to use scrText.ScrStylesheet(bookNum) for USFM conversion |
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change makes sense, and the draft generated from KJVA can be applied
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @pmachapman)
a57ce2c
to
6c99906
Compare
This PR fixes crashes that occur viewing or applying a draft, when a source book's book id is the wrong case, and the draft was generated from that source.
This change is