PloneCollectorNG get earliest issue/get latest issue
I'm trying to allow users to search for all issues within a date range. They get two text boxes to fill in the start and end dates. In my validation of the dates, I'm needing to make sure they don't specify a date range that comes before the date of the first created issue. I want to be able to catch that error and respond to them with the right feedback so they don't make that mistake again. How do I find out what the earliest date is in the cataloge? I'm thinking I would pull all issues and find the one with the earliest 'created' date. But I'm thinking there has to be a faster way. -- Regards, Bryan Simmons -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Rick Osborne -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
On Aug 26, 2004, at 22:09, Bryan Simmons wrote:
I'm trying to allow users to search for all issues within a date range. They get two text boxes to fill in the start and end dates. In my validation of the dates, I'm needing to make sure they don't specify a date range that comes before the date of the first created issue. I want to be able to catch that error and respond to them with the right feedback so they don't make that mistake again.
I honestly don't understand why it would be a "mistake" that involves annoying the user with a message and the need to re-phrase the query if the date range queried for starts earlier than the first collector item. Re-phrasing the query doesn't change the query results in any way, all it will do is annoy your users. I would let people query with any date range, provided that the start date is not later than the end date. jens
Well, suppose I want to find out what the earliest date is in the tracker so I can tell the user up front: "Earliest issue posted: 8/1/04". The problem here is not stupid design on my part. The problem is stupid users. I'm talking ultra-stupid. All I want to know is how to query for or otherwise find the earliest ticket. On Thu, 26 Aug 2004 23:05:04 +0200, Jens Vagelpohl <jens@dataflake.org> wrote:
On Aug 26, 2004, at 22:09, Bryan Simmons wrote:
I'm trying to allow users to search for all issues within a date range. They get two text boxes to fill in the start and end dates. In my validation of the dates, I'm needing to make sure they don't specify a date range that comes before the date of the first created issue. I want to be able to catch that error and respond to them with the right feedback so they don't make that mistake again.
I honestly don't understand why it would be a "mistake" that involves annoying the user with a message and the need to re-phrase the query if the date range queried for starts earlier than the first collector item. Re-phrasing the query doesn't change the query results in any way, all it will do is annoy your users. I would let people query with any date range, provided that the start date is not later than the end date.
jens
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- Regards, Bryan Simmons -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Rick Osborne -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Would the query: ('created'={'range' : 'min'}) do it? On Thu, 26 Aug 2004 18:07:03 -0400, Bryan Simmons <bryan.simmons@gmail.com> wrote:
Well, suppose I want to find out what the earliest date is in the tracker so I can tell the user up front: "Earliest issue posted: 8/1/04". The problem here is not stupid design on my part. The problem is stupid users. I'm talking ultra-stupid.
All I want to know is how to query for or otherwise find the earliest ticket.
On Thu, 26 Aug 2004 23:05:04 +0200, Jens Vagelpohl <jens@dataflake.org> wrote:
On Aug 26, 2004, at 22:09, Bryan Simmons wrote:
I'm trying to allow users to search for all issues within a date range. They get two text boxes to fill in the start and end dates. In my validation of the dates, I'm needing to make sure they don't specify a date range that comes before the date of the first created issue. I want to be able to catch that error and respond to them with the right feedback so they don't make that mistake again.
I honestly don't understand why it would be a "mistake" that involves annoying the user with a message and the need to re-phrase the query if the date range queried for starts earlier than the first collector item. Re-phrasing the query doesn't change the query results in any way, all it will do is annoy your users. I would let people query with any date range, provided that the start date is not later than the end date.
jens
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
--
Regards,
Bryan Simmons -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Rick Osborne -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-- Regards, Bryan Simmons -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Rick Osborne -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
participants (2)
-
Bryan Simmons -
Jens Vagelpohl