Wednesday, 5 September 2007

Bug: Trend propagation to monthly logs in the future

If a user makes log entries in a month in the future (for example, to add ``to do'' items in the comment field), the future month would be assigned a trend carry-forward at the time it was created, but the carry-forward would not be updated when weight entries were made in the current month because trend propagation was triggered only for entries in months prior to the ``current month'' in the user's time zone. This was an example of the sinfulness of premature optimisation---compared to the cost of updating the chart for an entry in a monthly log, checking the user directory for subsequent months, even if in the future, to which the trend should be propagated is negligible. I removed the unwarranted ``optimisation'' from ``Write updated log item back to database'', causing a check for trend propagation to be performed for all weight changes in monthly logs. (Reported by Anna E. Sage.)

No comments: