Allow relative date searches

Activity

Show:

Carlos Ruiz November 11, 2022 at 3:37 PM

- I wrote a comment in related to this one.

There are three possible points here:

1 - as you mention, saving a “relative range” query in a Find window

2 - setting a default value for parameters on process and info windows

3 - setting a user preference for the same, parameters on process and info windows

In these three cases we need some way to save that information to be restored when rendering the search, process or info window.

My suggestion in is trying to join these two ideas, we could use the field text suggested there for the “relative range” purpose here.

Norbert Bede November 2, 2022 at 3:29 PM
Edited

hi

while we are implemented Date Range component, we should change strategy here and we have opportunity for easier relative date range implementation.

next use case:

the user want see last sales opportunities which where ExpectedCloseDate in previous 7 days.

steps (can be any window, date field another scenario)

  1. open sales opportunities

  2. click on search zoom icon

  3. select tab Advanced

  4. select date field - ExpectedCloseDate

  5. select operator (new) “Relative Range” - new button for open date Range Component appear

  6. the user click on date range component - pop-up - select Previous 7 days

  7. Save the advanced filter setup as saved query

  8. iDempiere store relative range by agreed syntax

When Saved query selected, advanced filter applied, the syntax transform relative parameters to absolute and return records.

Please take a look, does this good direction ? We assume should work !

Carlos Ruiz July 24, 2020 at 9:04 AM

Just noticed that AddDays function in oracle can manage decimals properly, but our PostgreSQL version is wrongly truncating the timestamp. I think we can improve that, anyways allowing using decimals (which maybe is useful just for advanced users) makes sense.

Carlos Ruiz July 24, 2020 at 8:25 AM

But anyways, I would like to move ahead the "Days" if possible - which from what I have heard is the most common request.

The "Hours" can be developed later in another ticket, for the "days" I'm using the adddays database function, to implement "Hours" maybe we need to implement a new db function addhours, or to do some ConvertPostgres trick.

Heng Sin Low July 24, 2020 at 8:01 AM

Fraction for days will be hard to use for average user. I think better to add a new “Times” or “Hours” operator and allows fraction for minutes (fraction should be more mangeable here). The need to search by seconds should be very very rare.

Details

Assignee

Reporter

Priority

Created September 15, 2015 at 2:49 PM
Updated November 11, 2022 at 4:22 PM