-
-
Notifications
You must be signed in to change notification settings - Fork 554
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
deactivated users and team assignments #1781
Comments
Nope, that is not a wanted feature. What happens if you save the team (with the invisible user)? Will it get removed? |
If I may add my take on the case - I believe, that not only should deactivated users stay assigned to the teams (maybe hidden in UI, but they should not get unassigned), but also it should be possible to assign inactive users to new teams. At this moment this is not possible, and if you try to do it with API, a 400 is returned. To me having a deactivated user assigned to a team is perfectly reasonable state, and blocking an account IMHO should be treated as an entirely separate action from removing it from a team. It might be useful to have such deactivated users hidden in UI, and shown only on demand. However, if anything should be reported as a bug, to me, it is the 400 returned when trying to assign an inactive user to a team. At this moment, due to the way assignments are handled in API (you need to provide an entire list of the accounts), trying to manipulate them - even when a single assigned user is inactive - becomes problematic. Consider this situation:
Now, due to the fact, that API requires you to provide the entire list each time, you cannot add or remove any users without removing C from the list. This requires additional logic on the external tool's side, which may be an issue, because it might not be aware of C being deactivated. |
@kbancerz it makes perfect sense for me to unassign the user from all teams. Imagine a user quits his job and leaves the comapny - why should he stay assigned in all teams? |
@hmr-it-jr if the user quits his/her job, it might be still advisable to keep information on the previous assignments. I agree, that it may be a good idea to hide them in UI. In that case you lose no information, and you do not clutter teams with inactive accounts. It all depends on the way you treat deactivation. If you delete assignments, you have to reassign users after you reactivate them - which can easily happen (fixing a mistake, employee returning from a maternal leave etc.). |
Regarding the team assignments when deactivating a user: I will not change the current flow. A simple usecase why he should stay in the teams: after the user left the company, his previous teamlead still needs to see his booked times. That would not be possible, if the user is removed from all teams. We could add another checkbox "remove from all teams" but then you can already unassign them manually via the "Team" tab on the profile. I do agree though, that the behavior on the Team screens (and the API) should be improved.
|
This will be fixed for the next release.
The users will be shown in the member list UI when editing a team in 1.10. They were hidden previously (see above comment) and therefor accidentally removed from the team after updating it. Edit for clarification
See above, fixed.
Regarding "you need to provide an entire list of the accounts": what do you mean? There are explicit methods for adding and removing one user from a team. Don't use the patch, but one of the POST/DELETE endpoints?! Or did I misunderstand you?
Not sure what you mean. Can you explain that? Same misunderstanding then above? |
Honestly, I can't recall why at the moment, but I didn't use /member/ methods in our apps - it was either because they were just added in 1.10, or I totally missed them for some reason, when I was developing first versions of our internal integration engine. Either way, a fix to the way 'users' field is validated in PATCH method is great news. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai. |
Describe the bug
I don't know if this is a bug or feature but if you deactivate a user the user is still assigned to all teams - and can't be removed from his assigned teams.
To Reproduce
Steps to reproduce the behavior:
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: