Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamlining is:due, prop:due, and the FutureDue graph #904

Merged
merged 7 commits into from
Jan 8, 2021

Conversation

hgiesel
Copy link
Contributor

@hgiesel hgiesel commented Jan 7, 2021

These are all issues that rose up, when I was working on #897, specifically on the FutureDue graph.

  1. This one is definitely a bug:
    The Histogram graph for the stats had a one-off error, when displaying past ranges. The easiest way is to look at the FutureDue graph with Backlog enabled.
    The first "future" label reads: "In 0-4 days".
    The first past label reads: "0-4 days ago". This should actually be "1-5" days ago.

  2. This rest of the changes streamline how is:due, prop:due, and the FutureDue graph deal with due dates:

  • The FutureDue showed learning and preview repeat cards, which were scheduled for the past as being scheduled today (In fact it displayed all learning cards as scheduled today). Now it correctly displays them as backlog.
  • The is:due selector did not consider PreviewRepeat cards. Now it does.
  • The prop:due selector did not search for Learning or PreviewRepeat cards. Now it does. This requires having SQL do some math. Something I stumbled upon is that in SQL, dividing two integer values automatically does integer division.

Now these three features allow for a few sanity tests:

  1. -prop:due<=0 is:due should only ever show learning / preview repeat cards, which will be due some time later today, but are not yet.
  2. When the FutureDue graph shows: "In x-y days: n cards due", searching for prop:due>=x prop:due<=y should yield n cards. Additionally, when it shows "x-y days ago: n cards due", searching for prop:due<=-x prop:due>=-y should yield n cards.

* now they are shown as due in the past
* before that they were always displayed as due today
examples:
* x0 = -66 and x1 = -64 should yield 65-66 days ago instead of 64-65 days ago
* x0 = -2 and x1 = 0 should yield 1-2 days ago instead of 0-1 days ago
@dae
Copy link
Member

dae commented Jan 8, 2021

Looks good, thanks!

@dae dae merged commit 97e3bfe into ankitects:master Jan 8, 2021
@hgiesel hgiesel deleted the propdue branch January 8, 2021 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants