Skip to content

Publisher application form: prevent 'blind' and 'none' being entered into the form#2589

Open
varadekd wants to merge 6 commits into
developfrom
feature/4232_prevent_blind_none
Open

Publisher application form: prevent 'blind' and 'none' being entered into the form#2589
varadekd wants to merge 6 commits into
developfrom
feature/4232_prevent_blind_none

Conversation

@varadekd

@varadekd varadekd commented May 1, 2026

Copy link
Copy Markdown
Contributor

Publisher application form: prevent 'blind' and 'none' being entered into the form

  • The peer review question now includes "Triple anonymous peer review" as a selectable option, "Anonymous peer review" has been renamed to "Single anonymous peer review", and "Peer review" has been removed. A data migration handles existing records.
  • Two new validators are added: one prevents the word "blind" from being entered in the peer review Other field (publishers should use the structured checkboxes instead), and one prevents "None" from being entered in any of the six Other free-text fields across the form. Both fire client-side on tab navigation and server-side on submit.

This PR...

  • has scripts to run
  • has migrations to run
  • adds new infrastructure
  • changes the CI pipeline
  • affects the public site
  • affects the editorial area
  • affects the publisher area
  • affects the monitoring

Developer Checklist

Developers should review and confirm each of these items before requesting review

  • Code meets acceptance criteria from issue
  • Unit tests are written and all pass
  • User Test Scripts (if required) are written and have been run through
  • Project's coding standards are met
    • No deprecated methods are used
    • No magic strings/numbers - all strings are in constants or messages files
    • ES queries are wrapped in a Query object rather than inlined in the code
    • Where possible our common library functions have been used (e.g. dates manipulated via dates)
    • Cleaned up commented out code, etc
    • Urls are constructed with url_for not hard-coded
  • Code documentation and related non-code documentation has all been updated
  • Migation has been created and tested
  • There is a recent merge from develop

Reviewer Checklist

Reviewers should review and confirm each of these items before approval
If there are multiple reviewers, this section should be duplicated for each reviewer

  • Code meets acceptance criteria from issue
  • Unit tests are written and all pass
  • User Test Scripts (if required) are written and have been run through
  • Project's coding standards are met
    • No deprecated methods are used
    • No magic strings/numbers - all strings are in constants or messages files
    • ES queries are wrapped in a Query object rather than inlined in the code
    • Where possible our common library functions have been used (e.g. dates manipulated via dates)
    • Cleaned up commented out code, etc
    • Urls are constructed with url_for not hard-coded
  • Code documentation and related non-code documentation has all been updated
  • Migation has been created and tested
  • There is a recent merge from develop

Testing

List user test scripts that need to be run

List any non-unit test scripts that need to be run by reviewers

Deployment

What deployment considerations are there? (delete any sections you don't need)

Configuration changes

What configuration changes are included in this PR, and do we need to set specific values for production

Scripts

What scripts need to be run from the PR (e.g. if this is a report generating feature), and when (once, regularly, etc).

Migrations

What migrations need to be run to deploy this

Monitoring

What additional monitoring is required of the application as a result of this feature

New Infrastructure

What new infrastructure does this PR require (e.g. new services that need to run on the back-end).

Continuous Integration

What CI changes are required for this

@varadekd varadekd requested a review from richard-jones May 1, 2026 02:02
@varadekd varadekd marked this pull request as ready for review May 1, 2026 15:11

@richard-jones richard-jones left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the validators isn't working for reasons unknown, otherwise I've added a functional test and slightly changed the wording, and this looks good otherwise.

{"not_value": {
"value": "None",
"message": lazy_gettext("'None' is not a valid answer for this question. Leave blank.")
}} # ~~^-> NotValue:FormValidator~~

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reasons that aren't clear to me, this validation isn't working client-side. Possibly it's interacting with the multiple_field widget?

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.

2 participants