[rt-users] Find the first day of this month

Chris Herrmann chrisherrmann7 at gmail.com
Tue Dec 8 05:58:38 EST 2015


I also looked at the Attributes table, but the actual SavedSearch is stored
as a binary blob AFAICT? I was going to head down the path of updating the
contents of the field with a programmatically generated string once a day
or something like that:

queue = "myqueue" and Created > "2015-12-01"

i.e. just change the date in question every day so that the Dashboards and
scheduled email reports always have the desired dates. But... I can't see
how to do it with what's there... (a BLOB). And it looks really blobby too
- proper blob... not just a bunch of TEXT that happens to be stored as a
BLOB?

On 8 December 2015 at 21:55, Chris Herrmann <chrisherrmann7 at gmail.com>
wrote:

> Hi all,
>
> This has been kicked around a few times over the years if google & the
> list archives are anything to go on, but I haven't actually seen a solution
> that meets what any of the requestors (and me) want.
>
> Which is... to run a search using a date like:
>
> Queue = 'myqueue' and (  ( Status = 'open' or Status = 'new' ) OR (
> Resolved > 'first dow after last month' ) )
>
>
> or "last month + 1" or "first dom" or really anything that will
> programmatically always return the first day of this month. I have a shell
> script that does this by constructing a date in bash, and then passing the
> date to the query as a variable, but I can't do this within the "save
> search" function.
>
>
> The reason I'm after "save search" is that the HTML reports are easier for
> humans to read than the TSV extracts that the bash scripts generate.
>
>
> things like "last month" get close - but it simply works out "now - 30
> days". And I can't see a way in Time::ParseDate to extract the month and
> year in the same way I would in bash using something like `date +%b`
>
>
> MIT have a nice page that has better examples than the Time::Parse doco
> http://kb.mit.edu/confluence/pages/viewpage.action?pageId=4269222  but I
> can't work out how to construct the thing I want using what's available.
>
>
> Please tell me I'm wrong!
>
>
> Regards,
>
>
> Chris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20151208/cde3c4a2/attachment.html>


More information about the rt-users mailing list