-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AO3-6868 Add language form validation #5005
base: master
Are you sure you want to change the base?
AO3-6868 Add language form validation #5005
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, Connie, thanks for the pull request!
A couple small comments for you, and noting for myself that we'll want to run a query before the migration is run to check for duplicate language names. (If you feel confident in writing a Before rake task to do that, it would be helpful but the query should be easy by hand as well so don't worry about it either way!)
I've assigned the Jira issue to you and set its status to In Review so no one will mistakenly create a duplicate pull request. I've also given your account permission to comment on, assign, and transition issues in the future.
Thanks again for contributing! If you have any questions, you can contact us at [email protected].
Please revert the update to schema.rb, we prefer not to update the schema dump in unrelated PRs (refer to #4677). |
This reverts commit 04eb25d.
Hi @Bilka2! I've reverted the update to schema.rb, but it does cause rubocop to fail (example: https://github.com/otwcode/otwarchive/actions/runs/12519083042) -- should I disable rubocop for those specific lines? |
Hi @brianjaustin -- thanks! I will add the Before rake task :) |
You technically fixed the failure with the migration so it's fine to just keep it enabled. We'll ignore the failure when reviewing this PR since it's clear that it was addressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the rake task! Just 1 thing I missed on my first review, otherwise looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Pull Request Checklist
as the first thing in your pull request title (e.g.
AO3-1234 Fix thing
)until they are reviewed and merged before creating new pull requests.
Issue
https://otwarchive.atlassian.net/browse/AO3-6868
Purpose
This adds two form validations to the language form on the
/languages/<language abbreviation/edit
page:Also:
rake db:check_language_name_duplicates
Testing Instructions
/languages
Edit
on any of the languagesUpdate Language
and form validations should appearCredit
Connie Feng, she/her
(JIRA account)