Index: timelog_controller.rb =================================================================== --- timelog_controller.rb (revision 43) +++ timelog_controller.rb (revision 1811) @@ -150,7 +150,8 @@ respond_to do |format| format.html { flash[:notice] = l(:notice_successful_update) - redirect_back_or_default :action => 'index', :project_id => @time_entry.project + # Fix : after update redirect to the issue time entries list if possible + redirect_to :action => 'index', :project_id => @time_entry.project, :issue_id => @time_entry.issue_id } format.api { head :ok } end @@ -207,7 +208,18 @@ respond_to do |format| format.html { flash[:notice] = l(:notice_successful_delete) - redirect_back_or_default(:action => 'index', :project_id => @projects.first) + # FIX : after deletion, get back to the issue time entries list if not in bulk edit mode + only_time_entry = nil + if @time_entries.present? && (@time_entries.size == 1) + only_time_entry = @time_entries.first + end + + if only_time_entry.present? + redirect_to(:action => 'index', :project_id => only_time_entry.project_id, :issue_id => only_time_entry.issue_id) + else + redirect_back_or_default(:action => 'index', :project_id => @projects.first) + end + # END -- Smile specific FIX : Get back to the time entries for the issue if not in bulk edit mode } format.api { head :ok } end