Skip to content
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

Merged
merged 5 commits into from
May 17, 2023

Conversation

kewisch
Copy link
Contributor

@kewisch kewisch commented Feb 18, 2023

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.

@kewisch
Copy link
Contributor Author

kewisch commented Feb 18, 2023

Please check #5644 before merging, I have a question there and I'd like to extend this PR accordingly.

@kewisch
Copy link
Contributor Author

kewisch commented Feb 27, 2023

@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?

@ThiefMaster
Copy link
Member

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.

@kewisch kewisch force-pushed the overwrite-management branch from 471c134 to 8f76aea Compare March 4, 2023 23:31
@kewisch kewisch force-pushed the overwrite-management branch from 8f76aea to b07720e Compare March 4, 2023 23:40
@kewisch kewisch force-pushed the overwrite-management branch from b07720e to 4e416a0 Compare March 5, 2023 00:01
@kewisch kewisch force-pushed the overwrite-management branch from 4e416a0 to a581343 Compare March 5, 2023 00:08
@kewisch
Copy link
Contributor Author

kewisch commented Mar 5, 2023

Apologies for the many pushes, had some issues in my local repo that made the tests act differently. Should be good now!

@kewisch kewisch force-pushed the overwrite-management branch from a581343 to 3734738 Compare March 5, 2023 09:50
@kewisch
Copy link
Contributor Author

kewisch commented Mar 29, 2023

@ThiefMaster finally got around to fixing the review comments, should be good now. Maybe worth thinking about some linting plugin to enforce it, like pep8-naming ?

@ThiefMaster
Copy link
Member

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!

@ThiefMaster
Copy link
Member

#5714 - there we go. No more work for me to point out camelCase and similar issues... ;)

@ThiefMaster
Copy link
Member

Do you need this very soon yourself? Otherwise I might take this PR also as something for v3.3

@kewisch
Copy link
Contributor Author

kewisch commented Apr 12, 2023

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.

Copy link
Member

@ThiefMaster ThiefMaster left a 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 :)

@ThiefMaster
Copy link
Member

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.

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.

@kewisch kewisch force-pushed the overwrite-management branch from 0cc3c23 to f580d55 Compare May 8, 2023 21:02
@kewisch kewisch force-pushed the overwrite-management branch from f580d55 to 702cbde Compare May 8, 2023 21:03
@ThiefMaster ThiefMaster force-pushed the overwrite-management branch 4 times, most recently from 6105713 to c8c5900 Compare May 12, 2023 13:53
kewisch and others added 5 commits May 17, 2023 15:27
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.
@ThiefMaster ThiefMaster force-pushed the overwrite-management branch from 83432f8 to 5fac8e9 Compare May 17, 2023 13:27
@ThiefMaster ThiefMaster enabled auto-merge (rebase) May 17, 2023 13:29
@ThiefMaster ThiefMaster merged commit 617a16d into indico:master May 17, 2023
@kewisch kewisch deleted the overwrite-management branch January 24, 2024 20:21
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.

Allow managers to modify a registration despite form field requirements
3 participants