Loading...
 
Features / Usability

Features / Usability


[SOLVED] 'Divide by Zero' warning

posts: 228 Ukraine

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

posts: 126886 United Kingdom

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?

posts: 228 Ukraine
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.



posts: 228 Ukraine

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