Skip to content

Commit 81fa5c2

Browse files
committed
Fix JSON issue where remaining hours is reset when attribute is not in params array.
See http://forum.redminebacklogs.net/quot-Remaining-hours-quot-field-deleted-upon-JSON-ticket-update-td4025855.html
1 parent c534926 commit 81fa5c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/backlogs_hooks.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def controller_issues_edit_before_save(context={ })
343343
params = context[:params]
344344
issue = context[:issue]
345345

346-
if issue.is_task?
346+
if issue.is_task? && params.include?(:remaining_hours)
347347
begin
348348
issue.remaining_hours = Float(params[:remaining_hours])
349349
rescue ArgumentError, TypeError

0 commit comments

Comments
 (0)