Skip to content

Parse labeled series numbers above 999 - #5548

Open
justadityaraj wants to merge 1 commit into
advplyr:masterfrom
justadityaraj:fix/4781-labeled-series-sequence
Open

justadityaraj wants to merge 1 commit into
advplyr:masterfrom
justadityaraj:fix/4781-labeled-series-sequence

Conversation

@justadityaraj

Copy link
Copy Markdown

Brief summary

Parse labeled series sequence numbers above 999 without changing how unlabeled four-digit prefixes are interpreted.

Which issue is fixed?

Related to #4781 and #5103.

In-depth Description

Problem / Context

The folder parser limits every series sequence to three digits. As a result, documented labels such as Vol 1456 are not recognized, even though a label makes the value unambiguous and was recommended as the workaround for four-digit sequences. The remaining folder text is then parsed into the wrong metadata fields.

Changes

  • Allow labeled Vol, Volume, and Book sequences to contain more than three digits.
  • Keep the existing three-digit limit for unlabeled sequences so a prefix such as 1456 - Title continues to be treated as a publication year.
  • Add regression coverage for both behaviors.

User impact

Libraries with long-running serials can use an explicit label and have the sequence, publication year, and title scanned into the correct fields. Existing unlabeled year-based folder names keep their current meaning.

How have you tested this?

Verification

  • The new labeled-sequence regression failed against upstream/master before the parser change and passes afterward.
  • npx mocha test/server/utils/scandir.test.js — 3 passing.
  • npm test — 356 passing.
  • git diff --check — passed.

Screenshots

N/A — server-side folder metadata parsing only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant