A thread in the Software Testing Club asked about the funniest bugs people had seen. This one of mine is much about the way it was reported as it’s about the bug itself.
Many years ago, we had a support call from a customer, saying “Help, our system is possessed by the spirit of a negligent Edwardian maintenance engineer“.
The function dealt with planned maintenance schedules, which had a frequency in weeks. To allow for two-year maintenance intervals, the frequency field was a 3-digit integer.
The customer had a business requirement that was not explicitly supported; they wanted planned maintenance jobs that would be performed on-demand based on criteria that were outside the scope of the system, rather than performed at fixed intervals. When the engineers decided the job needed doing, they’d update the record and set the due date.
So they entered the maximum permissible number into the “Frequency” field, 999, which worked out as just short of 20 years. Once the maintenance task was performed and completed, the system would obediently calculate the next due date some time in the next century (I told you this was some time ago, didn’t I?)
Then the system started showing long-overdue maintenance tasks that were supposed to have been done in 1907.
We had hit an instance of what was later called the Y2K bug way back in 1987.
The irony was that the Oracle database at the time supported four-digit years, but the UI (built using a precursor to Oracle’s SQL*Forms) did not. The short-term workaround was to limit the value of the field to 520, buying enough time for Oracle’s UI tool to support 4-digit years properly. Later upgrades supported the “missing” functionality properly by making Frequency and Next Due Date optional fields.