Loading...
 
Skip to main content

Features / Usability


[SOLVED] 'Divide by Zero' warning

Hi,

Is there any way to eliminate the warning about a 'Divide by zero' issue with a mathematical field? It displays on wiki pages and in Trackers.

I know this issues exists, I do not want to fix it, I can live with it, I just don't need the warning displayed each time.

Thanks,
Mike


Hi Mike

I tried to fix that one ages ago but it broke some other things - i thought Victor also tried to fix it - which branch are you in?

Jonny Bradley wrote:

Hi Mike

I tried to fix that one ages ago but it broke some other things - i thought Victor also tried to fix it - which branch are you in?


I'm on Tiki 21.2.


Issue resolved -

this was a mistake on my part for not correctly formulating the 'mathematical calculation' field.

This is the original formula:

Copy to clipboard
(round(div(div(date (sub futureDate (date)))60)60)1)


This is the updated

Copy to clipboard
(if futureDate (round(div(div(date (sub futureDate (date)))60)60)1))


Adding the 'if' part resolved the issues.

br,
Mike