- Issue created by @siva01
- First commit to issue fork.
- 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
(Unassigning because 9 months old)
Agreed. Note that intervals of 0 do not get saved in the database at all. (That's an empty/deleted value. And "no value" gets displayed as 0 in the form.) So, allowing negative numbers while not allowing 0... can IMHO be treated as an oversight. And if anyone has saved negative values, they should just reexamine their use case.
I think we can just forbid negative numbers in the UI, and not check the actual backend save. This means the diff is a single line.
Note #min = 0, not 1... because otherwise, if you open an edit screen with an empty field -> gets displayed as 0 -> press save without changing anything -> immediate error.
(I am not going to think about whether an empty field value should actually be displayed as empty, rather than 0. That seems like a separate issue, that might lead to e.g. tweaking the IntervalItem::getInterval() return value, and also I personally don't need it.)
- 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
[ bogus comment: attempt at attribution change ]