Following the email from Joelle we should change the regex validation of nd_number field to a configuration option - so this will be configurable depending on the project requirements.
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
@piotr.gawron It's the ND_number only related to one project? or has something to do with redCap and other systems?
I just ask for future data relationships.
I propose to move this nd_number check to the StudySubject model itself with a method check_nd_number.
And maybe we can add the prefix in the study and set it in the configuration settings? But then what if it's changed afterwards, should I implement a method to change all nd_number from studySubjects?
Don't implement reassigning ND number functionality. If they want to change it someone will have to take care of it on the database level (it might not be as simple as prefix change).
I would give them possibility to define this regex though. Maybe they would like to add some suffix or to have different naming scheme (with letters indicating something).
Done in commit 5e114166 sorry for not linking commit message to the issue.
Commit message is:
added checks for forms
added check function in Study and StudySubject to avoid repeating a regex inline
removed previous checks in which the regex was rewritten
now the used regex is the one defined in the given study
added tests and migrations
changed functions in tests/functions to adapt the tests