Allow relative date searches

Description

another point is to add relative search (last x days).

Reference: http://wiki.idempiere.org/en/IDempiere_workshop_2015/transcript#saved_searches

Environment

None

Activity

Show:
Norbert Bede
July 21, 2020, 3:22 PM

thanks. this will support days. what if we would like to search last 2 hours or 180 minutes. eg. requests created in last 4 hours.

wdyt

Carlos Ruiz
July 21, 2020, 3:42 PM

Hi , I think we could add another operator HOURS or MINUTES or even SECONDS, in the same way.
Or maybe easier we could allow fractions on the DaysFrom and DaysTo and process fractions accordingly.

Heng Sin Low
July 24, 2020, 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.

Carlos Ruiz
July 24, 2020, 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.

Carlos Ruiz
July 24, 2020, 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.

Assignee

Carlos Ruiz

Reporter

Diego Ruiz

Tested By

None

Priority

Minor
Configure