Add due dates for projects
I'd like for projects to have due dates and for these due dates to be used for their associated actions if the action doesn't have a due date explicitly set.
Leave a comment
My email is kraai@ftbfs.org.
I started implementing the enhancement and I wonder wether it would be OK to just add another attribute of a todo - invididual due date (boolean) - if it is true the todo has its own deadline, otherwise the deadline is taken from the project.
I thought of such solution because if the only enhancement would be that the deadline of the todo is adjusted to the project deadline only if it is not set, the next time we set the project's due date the deadline of a todo would be already set and would remain unaffected. What is more, checking the equality of due dates of the project and the todo won't do the job because the fact that they are equal may be a coincidence.
Of course, it is possible to store how the deadline of the todo was changed ("by the project" or explicitly by the user) but in my opinion there is to much logic.
What do you think ?
I thought of such solution because if the only enhancement would be that the deadline of the todo is adjusted to the project deadline only if it is not set, the next time we set the project's due date the deadline of a todo would be already set and would remain unaffected. What is more, checking the equality of due dates of the project and the todo won't do the job because the fact that they are equal may be a coincidence.
Of course, it is possible to store how the deadline of the todo was changed ("by the project" or explicitly by the user) but in my opinion there is to much logic.
What do you think ?
Did you consider to implement it completely in the model? It would not affect the controllers and views.
I.e. when you ask the todo model for the due_date it first checks to see if the user has set a due_date on the todo. If not, the model looks to the due_date set on the corresponding project. This way, you can easily change the project due_date and automatically change the due_dates of all todos in the project, since it does not rely anymore solely on the stored due_date of the todo
I.e. when you ask the todo model for the due_date it first checks to see if the user has set a due_date on the todo. If not, the model looks to the due_date set on the corresponding project. This way, you can easily change the project due_date and automatically change the due_dates of all todos in the project, since it does not rely anymore solely on the stored due_date of the todo
<a href='http://www.assembla.com/spaces/tracks-tickets/documents/atZFYm0Tqr3zFJab7jnrAJ'>686.patch</a>: #686 patch
Migrated to GitHub issue #686