Actions
Patch #38645
closedRuntimeError when calling Project#destroy with overridden activity time entry
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Projects
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Description
Enumeration
has checks no records source:tags/5.0.5/app/models/enumeration.rb#L137 . So, TimeEntry
is must be deleted before deleting project specific TimeEntryActivity
.
only apply test/unit/project_test.rb changes on patch¶
yuya@yoshiyuki|0:10:39|0% bundle exec ruby ./test/unit/project_test.rb -n 'ProjectTest#test_destroy'
Run options: -n ProjectTest#test_destroy --seed 21856
# Running:
E
Error:
ProjectTest#test_destroy:
RuntimeError: Cannot delete enumeration
app/models/enumeration.rb:137:in `check_integrity'
app/models/enumeration.rb:90:in `destroy'
test/unit/project_test.rb:251:in `test_destroy'
rails test test/unit/project_test.rb:228
Finished in 2.306284s, 0.4336 runs/s, 1.7344 assertions/s.
1 runs, 4 assertions, 0 failures, 1 errors, 0 skips
after apply all of patch¶
yuya@yoshiyuki|0:12:35|0% bundle exec ruby ./test/unit/project_test.rb -n 'ProjectTest#test_destroy'
Run options: -n ProjectTest#test_destroy --seed 4288
# Running:
.
Finished in 2.949438s, 0.3390 runs/s, 3.7295 assertions/s.
1 runs, 11 assertions, 0 failures, 0 errors, 0 skips
Files
Related issues
Updated by Go MAEDA over 1 year ago
- Status changed from New to Closed
Thank you for posting the patch but it has already been fixed in #38286.
Updated by Go MAEDA over 1 year ago
- Is duplicate of Defect #38286: "Cannot delete enumeration" error may occur when attempting to delete a project with time entries added
Updated by Nishida Yuya over 1 year ago
Actions