-
Notifications
You must be signed in to change notification settings - Fork 459
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
Allow managers to ignore required field restrictions in registrations #5682
Conversation
b8ef0cb
to
ffb764c
Compare
Please check #5644 before merging, I have a question there and I'd like to extend this PR accordingly. |
ffb764c
to
3b717b9
Compare
3b717b9
to
c75e713
Compare
c75e713
to
471c134
Compare
@ThiefMaster this should be ready to review now. I've not added any tests yet though they would certainly be useful given make_registration_schema is used in a few places. I may get to that next weekend, but I wanted to see how you feel about the remaining changes. I'm also not sure how to deal with the translation changes. I've run the i18n script and it changed a bunch of line numbers in unrelated strings, so I'm guessing this is usually run separately? |
You're right - so please don't update i18n pot files in PRs - we run the extract (and upload to transifex) from time to time; in PRs it'd just add noise and make conflicts very likely as well. |
471c134
to
8f76aea
Compare
8f76aea
to
b07720e
Compare
b07720e
to
4e416a0
Compare
4e416a0
to
a581343
Compare
Apologies for the many pushes, had some issues in my local repo that made the tests act differently. Should be good now! |
a581343
to
3734738
Compare
3734738
to
0da1f5a
Compare
0da1f5a
to
3982421
Compare
@ThiefMaster finally got around to fixing the review comments, should be good now. Maybe worth thinking about some linting plugin to enforce it, like |
Oh wow, I didn't know of that plugin. I'm going to look into adding that tomorrow for sure! May have to disable some checks because of too many false positives that cannot be easily ignored, but the general check for camelCase is already nice! |
#5714 - there we go. No more work for me to point out camelCase and similar issues... ;) |
Do you need this very soon yourself? Otherwise I might take this PR also as something for v3.3 |
When are you expecting 3.3? We've been working around by just not making fields required, so I suspect it could go into 3.3. I'll check with the team that requested this. |
6e04659
to
cca129d
Compare
cca129d
to
0cc3c23
Compare
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.
Really nice PR and works well. Most of the suggestions are just stylistic :)
indico/modules/events/registration/controllers/management/reglists_test.py
Outdated
Show resolved
Hide resolved
indico/modules/events/registration/controllers/management/reglists_test.py
Outdated
Show resolved
Hide resolved
indico/modules/events/registration/controllers/management/reglists_test.py
Outdated
Show resolved
Hide resolved
indico/modules/events/registration/controllers/management/reglists_test.py
Outdated
Show resolved
Hide resolved
Considering that the PR is really high quality (thanks for the tests!) I feel comfortable merging this into 3.2.4 before branching out for 3.3. |
0cc3c23
to
f580d55
Compare
f580d55
to
702cbde
Compare
6105713
to
c8c5900
Compare
We don't want to save a value unless the manager actively selects one, in order to give managers the opportunity to not set a value for all required fields, and neither force setting a value for fields that do not really have a "no value" state.
Also improve variable naming
Otherwise it's not possible to untick a required checkbox field that was previously checked.
83432f8
to
5fac8e9
Compare
Fixes #5644.
I've decided to leave out the checkbox and have this happen implicitly. This feels more natural and requires one less thing to click on.