Project

General

Profile

Actions

Defect #2707

closed

TimeLog adds a new log instead of update on Edit

Added by Mario Michelli over 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
High
Category:
Time tracking
Target version:
-
Start date:
2009-02-10
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

When you edit a time log, a new time log is produced instead of edited.

In
In http://www.redmine.org/repositories/changes/redmine/trunk/app/views/timelog/edit.rhtml
This:
<% labelled_tabular_form_for :time_entry, @time_entry, :url => {:action => 'edit', :project_id => @time_entry.project} do |f| >
Should be:
<
labelled_tabular_form_for :time_entry, @time_entry, :url => {:action => 'edit', :id => @time_entry, :project_id => @time_entry.project} do |f| %>

Many thanks,
Mario

p.s. can I be a contributor, or is there a way already?


Files

edit.rhtml (1.05 KB) edit.rhtml The updated file. Mario Michelli, 2009-02-10 13:34
0001-Fixed-the-TimeLog-form-it-was-always-posting-to-the.patch (2.51 KB) 0001-Fixed-the-TimeLog-form-it-was-always-posting-to-the.patch Alternative fix Eric Davis, 2009-02-10 18:37
Actions #1

Updated by Eric Davis over 15 years ago

  • Category set to Time tracking
  • Assignee set to Eric Davis
  • Affected version (unused) set to devel
Actions #2

Updated by Eric Davis over 15 years ago

Nice, looks like Jean-Philippe commited right before I did with r2434.

I took a different approach through: instead of adding the TimeEntry id, I make the new TimeEntry route only accept get requests (REST standard) and make the form send post requests. I've attached a patch to illustrate.

Which way would be better?

Actions #3

Updated by Jean-Philippe Lang over 14 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Fixed
Actions

Also available in: Atom PDF