Project

General

Profile

Defect #1283

Start date is not set automatically on new task creation

Added by Angelinsky7 Angelinsky7 over 7 years ago. Updated over 7 years ago.

Status:
New
Priority:
Low
Category:
Sprint board
Target version:
-
Source:
Development
Detected on version:
Blocked:
No
Alone:
Milestones:
Sprint:

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

scrum_start_date_16.2.patch (4.91 KB) scrum_start_date_16.2.patch Angelinsky7 Angelinsky7, 2017-01-10 17:59
#1

Updated by Angelinsky7 Angelinsky7 over 7 years ago

related to #1198

#2

Updated by Angelinsky7 Angelinsky7 over 7 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.

Also available in: Atom PDF