Relax Publisher Abbreviations rules and validations to permit ^[a-zA-Z][\w-]+$
Context
NCBI needs to be able to migrate all of its existing publishers and domains to the new BCMS using its migration scripts. NCBI has existing publisher abbreviations (e.g., otis-mtb
) that don't match this current syntax used by the BCMS to do a number of validations, such as select permitted workflow types for that publisher that permits users to create books and collections within it:
^[a-zA-Z][\w]+$
So for the user to be able to create books and collections, this check should be relaxed to:
^[a-zA-Z][\w-]+$
Unless this will break something we cannot understand.
The testing plan for #1480 (closed) depends on this issue being implemented.
Proposal
Relax Publisher Abbreviations rules and validations to permit ^[a-zA-Z][\w-]+$
- Start with a letter (either uppercase or lowercase).
- Are followed by one or more characters that can be alphanumeric, underscore, or hyphen.
- Have no other characters or whitespace.
Design
Current UI:
The only change here is to update the error text to include hyphen: "Abbreviated name may only contain letters, numbers, underscore, and hyphen character"
Acceptance criteria
-
System Admin can create a publisher (i.e., BCMS Org) with a hyphen in their abbreviation, e.g., otis-mtb
-
System Admin can change all publisher settings with publisher (i.e., BCMS Org) with a hyphen in their abbreviation, e.g., add supported workflows -
When the System admin creates a new Org in the BCMS and inputs an Abbreviated name for that Org, this is validated according to the regex rules ^[a-zA-Z][\w-]+$
(and the error text "Abbreviated name may only contain letters, numbers, underscore, and hyphen character" is shown to guide the user only in cases where those rules are not met) -
NCBI can successfully migrate existing Publishers and all of their linked domains in the PMCBook database to the BCMS (e.g., publisher with abbreviation otis-mtb
and their bookmtb
)
Definition of ready
-
BCMS User Story / Context has been well defined -
The priority of the user story is specified and agreed -
Digital assets added (design, database scheme, mockups etc if relevant) -
Coko Technical Proposal approved by NCBI -
Testable Acceptance Criteria approved by NCBI -
Estimate of effort to complete (time or points) -
The issue has been broken down into development tasks (if necessary) -
Requirements Clarified -
The product owner and development team agree that the user story is ready for development -
NCBI adds “Dev_Ready”
Definition of done
-
All coding tasks are finished and implemented by Coko -
Corresponding change has been made in NCBI system (Domain Service) - BK-26269 assigned @deniskar -
QA approved by Coko -
Deployed and tested on “ncbidev” (by Coko team) -
Deployed and tested on “ncbi” (by NCBI team) -
Deployed by NCBI and NCBI confirms can migrate mtb
tootis-mtb
org -
NCBI confirms Acceptance Criteria Met
Implementation
This issue amends the Create Publisher and Update publisher calls documented here: https://gitlab.coko.foundation/ncbi/ncbi/-/issues/226#6-create-a-publisher
Alternative approaches (if applicable)
Scheduling
-
Milestone is linked -
Iteration is linked -
Dependencies: ("None" or list issue numbers if relevant) -
Development estimate is added to issue time tracking