Permalink
Browse files

Backend support to allow updating the task for a time entry

  • Loading branch information...
1 parent 7e7fe41 commit a03a199dd1833db755f096f9fc47e2f1cadbdc9b David Powell committed Apr 20, 2012
Showing with 10 additions and 0 deletions.
  1. +3 −0 dashboard.rb
  2. +7 −0 lib/slim_dash.rb
View
@@ -242,6 +242,9 @@ def fmt_duration(d)
if params['end_id']
SlimDash.set_time(params["end_id"], params["value"], false)
end
+ if params['task_id']
+ SlimDash.set_task(params["task_id"], params["value"])
+ end
SlimDash.today_entries(request.env['REMOTE_USER'])
end
View
@@ -100,6 +100,13 @@ def entry_start(p_task_id, user_email, comments)
TimeEntryLocal.new(attrs).save
end
+ # Allow the task of an entry
+ def set_task(entry_id, task_id)
+ entry = TimeEntryLocal.get(entry_id)
+ entry.slimtimer_task_id = task_id
+ entry.save
+ end
+
# Allow the setting of a comment on an entry
def set_comment(entry_id, comment)
entry = TimeEntryLocal.get(entry_id)

0 comments on commit a03a199

Please sign in to comment.