-
Notifications
You must be signed in to change notification settings - Fork 3
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
Recreate cleaning schedule #34
Comments
Please help me understand your circumstances
Do you mean you deleted one of the 5 schedules? |
My situation is as following 4 people and 5 schedules. This led to the situation that the people were assigned to a single schedule as following: 1, 2, 3, 4, 4. Thats not an issue at all its as far as is can tell a totally meaningful order. But it was not my intention since i wanted something more like: 1, 2, 3, 4, 1, 2, 3, 4. |
The order in which Cleaners are assigned to a Schedule has a random element in it, which means that it won't be a nice "1, 2, 3, 4, 1, 2, 3, 4"-ordering. Overall, in the long term, all Cleaners will have an equal number of Assignments for a Schedule.
For a running system I want to restrict the abilities of the Admin, so that the Assignments for a Cleaner don't change when they don't need to be changed. This is why I haven't implemented the ability of recreating valid Assignments yet. I want a Cleaner to be able to trust in the stability of the Assignments to some degree. There are two possibilities for what you would like to achieve: 1. In CleanSys iself, without needing a terminal. This can only affect Assignments in the future.If you would like to reschedule all future Assignments of a Schedule, you can recreate (delete, then add) the Affiliation (Zugehörigkeit) of a Cleaner who is part of a Schedule. This will set all Assignments in the given timeframe, of all Schedules he/she is a part of, to invalid. 2. Using a Terminal. Will delete all Assignments of a Schedule.Open the django shell in the terminal with Take note of the Schedule's slug. Example: Schedule name: "Obere Küche" -> Schedule's slug "obere-kuche" Run these commands, one after the other, and make sure the variables have the correct content. I wrote these commands down from memory. from webinterface.models import *
schedule = Schedule.objects.get(slug="schedule-slug")
print(schedule)
assignments = schedule.assignment_set
print(assignments)
assignments.delete() The schedule should be free of Assignments now. |
Okay I see your point. In my opinion with great power comes great responsibility and an admin should think before he does something and therefore should be able to do whatever she wants to do. But now that you've pointed out how to do this with a bit more effort I'm totally fine with this. It's definitely not a common problem and should only occur in initial configuration when you want to partially reset. So a bit more effort for this is fine :bow This may be another issue but I do not quite get whats the reason behind the random component in assignments when |
Hey,
Just finished setting everything up and looks very good. But when setting up the cleaning schedule I've re-decided - after already generating the schedule - to change the existing schedules from 5 to 4 (since I do not want to have schedules occurying twice with 4 members). But now I do not see any possibility to either reschedule everything (since formally the existing ones are correct) or at least it would be nice to have an option to delete all existing schedules.
Thank you
The text was updated successfully, but these errors were encountered: