'Between' Operator for Date Fields
Added by Chris Platts almost 13 years ago
I'm trying to add a 'Between' operator for queries on date fields. For example, it would be possible to specify that a query includes issues created between date X and date Y.
I'm something of a newbie to RoR, so I wondered if anyone could offer any advice. I've got as far as adding a new operator
(">=<") to the
date_past field type. However, I'm now struggling to present the correct date entry fields on the page. The problem seems to be that the
date_past type is coded to only show a single small textbox for the number of days. I'd like to extend this so that if my 'Between' operator is chosen from the dropdown, two textboxes (or possibly date-pickers) are shown in the UI.
Can anyone offer any ideas?
RE: 'Between' Operator for Date Fields - Added by Eric Davis almost 13 years ago
I've got some code for a client that adds a date range filter (after X but before Y). I'll have to dig it up and see if it can be added to the Redmine core for 1.1.
RE: 'Between' Operator for Date Fields - Added by Chris Platts almost 13 years ago
I've bought myself some time on this by writing a desktop app to run adhoc SQL queries against the Redmine database. Slightly hacky, but it's working for the time being.
RE: 'Between' Operator for Date Fields - Added by Andrea Saccavini over 12 years ago
i have opened an issue with the same theme: #6954.
I'll try a patch but it seems to be not so simple.