-
Notifications
You must be signed in to change notification settings - Fork 147
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
Delete participations of long inactive users #2329
base: main
Are you sure you want to change the base?
Conversation
…default of 18 months
…ing months to seconds
…or vote start/end date instead of flat value
…ed as "can_be_marked_inactive_by_manager"
…ed to add +1 to get above threshold
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.
Good work so far! Sorry, quite a few comments added up, this could be a bit overwhelming. We want to address everything so we don't get stuck in endless review loops. We're always happy to help out and answer any questions, so make sure to ask if anything is unclear.
Co-authored-by: Richard Ebeling <[email protected]>
Co-authored-by: Richard Ebeling <[email protected]>
Thanks for your time in reviewing this PR, especially for all the fixes and explanations. Much appreciated 👍. |
…r as participant and add beginning check for user.evaluations_participating_in.exists()
@Redflashx12 Do you want to keep working on this PR (this or next year), or should we take over? |
I'll be active in EvaP in January again, still busy with moving in rn.
Sorry 😐
…On Mon, 16 Dec 2024, 17:33 Niklas Mohrin, ***@***.***> wrote:
@Redflashx12 <https://github.com/Redflashx12> Do you want to keep working
on this PR (this or next year), or should we take over?
—
Reply to this email directly, view it on GitHub
<#2329 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKLX2ZLRWBUPBCKUJTKOG6T2F36FLAVCNFSM6AAAAABRE6L5G2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBWGA4TSNBTGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Great, good luck with that! No need to worry or hurry, we just want to track the status of the PR :) |
Co-authored-by: Johannes Wolf <[email protected]>
Co-authored-by: Johannes Wolf <[email protected]>
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.
Looks mostly good to me, I only have minor comments:
@@ -195,6 +196,9 @@ def bulk_update_users(request, user_file_content, test_run): # noqa: PLR0912 | |||
user, deletable_users + users_to_mark_inactive, test_run | |||
): | |||
messages.warning(request, message) | |||
for user in users_to_mark_inactive: | |||
for message in remove_inactive_participations(user, test_run): | |||
messages.warning(request, message) |
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.
This line is not covered by tests, because we only test the implementation of remove_inactive_participations
- should we modify TestUserBulkUpdateView
to include this? @richardebeling @Kakadus
It would boil down to setting up a situation where a user is marked as inactive and checking that the message appears.
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.
I'm not sure whether you want me to implement this and if so, where can I find the TestUserBuildUpdateView
? I didn't find it when searching through the project files.
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.
Typo, it's supposed to be bulk update (TestUserBulkUpdateView
). Since @richardebeling seems to agree, I think we would want a short test in that class so that some of the warnings you added are shown
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.
In the future, it would probably be nice to have the accounts listed in one message like those to be marked inactive, but I think it's fine for now.
Fixes #2176.
Additionally added two test in class RemoveUserDueToInactivity. During test run of "Bulk update users" in the web with evap/staff/fixtures/test_user_bulk_update_file.txt, Lyndsey Lattimore should get removed from 1 participation(s) due to inactivity..