When a purchase is recorded, the estimated number of days until the next purchase date should be calculated and recorded in the database
The merged solution did not meet the criteria in that it stores the last_estimate value as a unix (epoch) timestamp. While the code is functional, we discussed in the Sunday sync why this value is challenging due to it not being human readable and it making debugging more difficult to reason about.
The objective to resolve this issue is to refactor the changes made in https://github.com/the-collab-lab/tcl-23-smart-shopping-list/pull/26 to store the calculated estimate in days from the last_purchased time until the anticipated time of the next purchase. We will also need to modify any consumers of the last_estimate attribute to ensure we handle the new value appropriately.
In Issue https://github.com/the-collab-lab/tcl-23-smart-shopping-list/issues/11 we were tasked with the following Acceptance Criteria:
The merged solution did not meet the criteria in that it stores the
last_estimate
value as a unix (epoch) timestamp. While the code is functional, we discussed in the Sunday sync why this value is challenging due to it not being human readable and it making debugging more difficult to reason about.The objective to resolve this issue is to refactor the changes made in https://github.com/the-collab-lab/tcl-23-smart-shopping-list/pull/26 to store the calculated estimate in days from the
last_purchased
time until the anticipated time of the next purchase. We will also need to modify any consumers of thelast_estimate
attribute to ensure we handle the new value appropriately.cc @yenly