Project

General

Profile

Actions

Improvement #1965

closed

xmera Omnia - Collection #2104: Improvements: mail, calculations

Rescue failing calculations

Added by liaham about 1 year ago. Updated 12 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
3.00 h
Compatible Redmine Version:

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.


Related issues 1 (0 open1 closed)

Related to Redmine Computable Custom Field - Feature #2105: Support numbers in a formulaClosedliaham

Actions
Actions #1

Updated by liaham about 1 year ago

  • Parent task set to #1837
Actions #2

Updated by liaham about 1 year ago

  • Estimated time set to 3.00 h
Actions #3

Updated by liaham 12 months ago

  • Parent task changed from #1837 to #2104
Actions #4

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.

Actions #5

Updated by liaham 12 months ago

Actions #6

Updated by liaham 12 months ago

  • Target version changed from unreleased to 3.0.7
Actions

Also available in: Atom PDF