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

Selecting Invoice filtering for the "last 24 hours" should not set a startDate filtering #1775

Closed
NicolasDorier opened this issue Jul 27, 2020 · 3 comments · Fixed by #1754
Closed
Assignees

Comments

@NicolasDorier
Copy link
Member

Ping @rockstardev @dennisreimann

With the new feature of saving preferences in cookie for searches, we should change the way we handle filters such as "Show invoice in the last 24H".

Currently, imagine the user is end of the 24 july.

  • User set filter "show invoice in the last 24H", it will show the invoice that happened the 24 july.
  • Tomorrow, same time, he comes back, go in the invoice list, and expect to see the invoices of the 25 july.
  • However, the actualy behavior will be to show him the 24 july and 25 july. Because the filter string is only understanding "startDate: beggining of 24".
@rockstardev rockstardev self-assigned this Jul 27, 2020
@rockstardev
Copy link
Member

What needs to be done here is that we to create filter for startDate:-24h that will take -24h string and evaluate it at the moment of processing on the server (taking into account user's time zone value that's also coming in).

This can be done as part of SearchString.GetFilterDate method:
https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer/SearchString.cs#L57

If someone wants to take stab at it, go for it... otherwise I'll do it as part of #1754 tonight (while also implementing blob for Nicolas).

@rockstardev rockstardev removed their assignment Jul 27, 2020
@dennisreimann
Copy link
Member

@rockstardev Sounds perfect, go for it!

@rockstardev
Copy link
Member

Ready for review @NicolasDorier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants