Defect #1283
Start date is not set automatically on new task creation
Description
When we create a new subtask via the sprint page the start date is not set.
Now, in redmine, there is an option to automatically set the start date, so if we use the create new sub task action from redmine, there is a start date.
One more time a naive and easy way to correct this:
update the app/controllers/sprints_controller.rb file and edit the change_task_status action :
def change_task_status @issue = Issue.find(params[:task].match(/^task_(\d+)$/)[1].to_i) @old_status = @issue.status @issue.init_journal(User.current) @issue.status = IssueStatus.find(params[:status].to_i) raise 'New status is not allowed' unless @issue.new_statuses_allowed_to.include?(@issue.status) @issue.start_date = Date.today if @issue.status != @old_status and (@issue.start_date.nil?) @issue.save! respond_to do |format| format.js { render 'scrum/update_task' } end end
if we want to be completly correct we should add this to ensure that this option is only use when the redmine option is set. (or add a scrum plugin option ???)
Setting.default_issue_start_date_to_creation_date?
Files
Updated by Angelinsky7 Angelinsky7 almost 8 years ago
i've been thinking and change a little bit how this proposition could work.
i've added two new setting : status_id_set_startdate and status_id_set_enddate (for due date)
so when a change occurs if those settings are set and the date is null the update are done.
the patch file if someone want it.