SF-3722 Fix errors on format options when no source access#3715
SF-3722 Fix errors on format options when no source access#3715pmachapman wants to merge 1 commit intomasterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3715 +/- ##
=======================================
Coverage 81.33% 81.33%
=======================================
Files 620 620
Lines 39037 39046 +9
Branches 6364 6342 -22
=======================================
+ Hits 31749 31758 +9
- Misses 6304 6318 +14
+ Partials 984 970 -14 ☔ View full report in Codecov by Sentry. |
1621063 to
85bde82
Compare
|
Why do we need access to the source in order to show the draft? |
@Nateowami To get the list of valid chapters for the draft (we can't use the versification to calculate this in the frontend). |
|
Why can't we fetch the draft from the back end and see how many chapters are in it? |
@Nateowami We retrieve each chapter individually. If we were to fetch the whole draft, we would need a way to parse the USFM and calculate the number of chapters on the frontend. We also can't use the versification to figure out the chapters on the frontend (as is is not present there), so we would likely need some new endpoint just to get the number of chapters. The simplest way is just to see the numbers of chapters in the source USFM, as these should match the chapters drafted. |
This PR updates the draft USFM format options page to show a warning if the user cannot access the source project, and only allow access to the first chapter.
This change is