Defect #19606

Issue Estimated Time not updated on tracker change

Added by Stephane Evr about 3 years ago. Updated about 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues
Target version:3.0.2
Resolution:Fixed Affected version:3.0.1

Description

The problem occurs when the issue tracker is changed to another which does not have the estimated time field activated:

- Create a main issue with a tracker which has the "Estimated time" field
- Create a subtask with a tracker which has also the the "Estimated time" field and set it to X hours
- Change the tracker of this subtask to another which does not have the the "Estimated time" field activated
- Go to the parent task

Result: Estimated time on the parent task is still X hours

From my searches, I can see that the issue estimated time is not changed in DB. It won't change to null, but remain to X hours.

issue_tracker_estimated_time.diff Magnifier - issue.rb patch (508 Bytes) Stephane Evr, 2015-04-14 11:34

issue_tracker_estimated_time.diff Magnifier - issue.rb patch (471 Bytes) Stephane Evr, 2015-04-14 11:58

Associated revisions

Revision 14180
Added by Jean-Philippe Lang about 3 years ago

When changing tracker, clear the attributes that are disabled for the new tracker (#17527).

History

#1 Updated by Stephane Evr about 3 years ago

I had a deeper look into the code, I think that the method to patch is
tracker=(tracker) in app/models/tracker.rb where in case the new tracker does not have the Estimated Time field activated, we nullify the estimated time of the issue.

#2 Updated by Stephane Evr about 3 years ago

I have put this simple patch to the method mentioned above.
This seems to resolve the problem so far

#4 Updated by Stephane Evr about 3 years ago

See the latest file

#5 Updated by Jean-Philippe Lang about 3 years ago

  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 3.0.2
  • Resolution set to Fixed

Fixed in r14180, thanks for pointing this out.

#6 Updated by Jean-Philippe Lang about 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF