Negative value in interval

Created on 30 September 2024, 11 months ago

It's possible to set a negative value for the interval. There are also no minimum or maximum limits. I don't see any situation where a negative interval would make sense. We can't change past events, so I believe this is a bug.

🐛 Bug report
Status

Active

Version

1.14

Component

Code

Created by

🇨🇿Czech Republic siva01

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @siva01
  • First commit to issue fork.
  • Pipeline finished with Success
    23 days ago
    Total: 166s
    #556074
  • 🇳🇱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 ]

Production build 0.71.5 2024