-
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()
evaluation_count = user.evaluations_participating_in.count() | ||
if test_run: | ||
return [ | ||
_("{} will be removed from {} participation(s) due to inactivity.").format(user.full_name, evaluation_count) |
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.
_("{} will be removed from {} participation(s) due to inactivity.").format(user.full_name, evaluation_count) | |
ngettext( | |
"{} participation of {} would be removed due to inactivity.", | |
"{} participations of {} would be removed due to inactivity.", | |
evaluation_count, | |
).format(evaluation_count, user.full_name) |
_("{} will be removed from {} participation(s) due to inactivity.").format(user.full_name, evaluation_count) | ||
] | ||
user.evaluations_participating_in.clear() | ||
return [_("Removed {} from {} participation(s) due to inactivity.").format(user.full_name, evaluation_count)] |
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.
return [_("Removed {} from {} participation(s) due to inactivity.").format(user.full_name, evaluation_count)] | |
return [ | |
ngettext( | |
"{} participation of {} was removed due to inactivity.", | |
"{} participations of {} were removed due to inactivity.", | |
evaluation_count, | |
).format(evaluation_count, user.full_name) | |
] |
@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 :) |
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..