Project

General

Profile

Defect #35066 » 35066-v2.patch

Go MAEDA, 2021-05-24 16:48

View differences:

app/controllers/timelog_controller.rb
130 130
              :back_url => params[:back_url]
131 131
            }
132 132
            if params[:project_id] && @time_entry.project
133
              options[:time_entry][:project_id] ||= @time_entry.project.id
133 134
              redirect_to new_project_time_entry_path(@time_entry.project, options)
134 135
            elsif params[:issue_id] && @time_entry.issue
135 136
              redirect_to new_issue_time_entry_path(@time_entry.issue, options)
test/functional/timelog_controller_test.rb
458 458
        },
459 459
        :continue => '1'
460 460
      }
461
      assert_redirected_to '/projects/ecookbook/time_entries/new?time_entry%5Bactivity_id%5D=11&time_entry%5Bissue_id%5D=&time_entry%5Bproject_id%5D=&time_entry%5Bspent_on%5D=2008-03-14'
461
      assert_redirected_to '/projects/ecookbook/time_entries/new?time_entry%5Bactivity_id%5D=11&time_entry%5Bissue_id%5D=&time_entry%5Bproject_id%5D=1&time_entry%5Bspent_on%5D=2008-03-14'
462 462
    end
463 463
  end
464 464

  
(4-4/4)