Actions
Improvement #1965
closedxmera Omnia - Collection #2104: Improvements: mail, calculations
Rescue failing calculations
Start date:
Due date:
% Done:
100%
Estimated time:
3.00 h
Compatible Redmine Version:
Pull Request Link:
Description
Especially when a user types in a custom formula, the calculation might raise an exception. This should be rescued with an appropriate user message.
Updated by liaham 12 months ago
- Status changed from New to Closed
- Assignee set to liaham
- % Done changed from 0 to 100
The method ModelPatch#calculate_computable_field
is rescued in case an exception will be raised.
This is only a workaround:
Since the method ModelPatch#calculate_computable_field
is executed before_validation adding an error
won't take effect since errors are cleared before validation starts. The value 'unsupported_formula' won't be rendered since strings are casted to float or integers. The user will see a '0' or '0.00' instead.
Updated by liaham 12 months ago
- Related to Feature #2105: Support numbers in a formula added
Actions