Possible to make expected chapter count lower than than actual chapter count

Description

Steps to Reproduce:

  1. Log in.

  2. Create and post a new work.

  3. Open the edit form for the work in two windows (or tabs).

  4. In the first window, set the total chapter count to 2 and press Preview.

  5. Leave the preview open and switch to the other window.

  6. Go to Add Chapter, fill in a chapter body, and post.

  7. Go to Add Chapter, fill in a chapter body, and post.

  8. Switch back to the window previewing the work with chapter count 2 and press Update.

  9. Note that your chapter count is listed as 3/2.

Normally the expected number of chapters is set through the wip_length, which overrides the expected chapter count and sets it to ? if the user tries to set the expected count lower than the actual count. But the hidden field on the preview page uses expected_number_of_chapters instead of wip_length, and expected_number_of_chapters has no safeguards.

Assignee

Unassigned

Reporter

ticking instant

Roadmap

Works

Priority

Low

Affects versions

Fix versions

None

Components

BackEnd

Difficulty

Medium

Milestone

Internal 0.9
Configure