[rt-users] Find the first day of this month
Christian Loos
cloos at netcologne.de
Tue Dec 8 06:25:41 EST 2015
Hi Chris,
won't help you now but RT 4.4.0 will support this if you set
$PreferDateTimeFormatNatural to 1:
https://github.com/bestpractical/rt/commit/4836a20
If you really need this in RT 4.2 you can try applying these commits:
https://github.com/bestpractical/rt/commit/f446755
https://github.com/bestpractical/rt/commit/e527517
https://github.com/bestpractical/rt/commit/4836a20
Maybe this will work, but I didn't checked it.
Chris
Am 08.12.2015 um 11:55 schrieb Chris Herrmann:
> 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
>
More information about the rt-users
mailing list