date parsers
NOTE: I'm running version 2.1.20_beta_4 in my test environment.
It appears the date parsers are not functioning correctly. I've tried both the dayOfTheWeek as well as hour parsers, and I am consistently getting the following error:
:: PARSE ERROR : Encountered "" at line 1, column 1. Was expecting one of:
An example of my configuration that's producing this error is: (hour(%{10470}) < 4) or (dayOfTheWeek(%{10470}) < {Wednesday})
Field 10470 is a date-type field. I've also tried it with the current date field which is a "date and time" type field with equal results. I've tried both with and without the time zone variable and for dayOfTheWeek I've tried with both the macro "{Wednesday}" as well as the numeric 4. Neither worked.
If it's an incorrect configuration on my end, please advise. Likewise, if you need some additional information, let me know.
Thanks, -Matt
Comments (3)
-
repo owner -
reporter Excellent, that did it... That additional little '%' getting in the way.
Thanks!
-
repo owner - changed status to resolved
- Log in to comment
Correct boolean expression is:
For readability I copy and paste here the expression entered:
hour({10470}, LOCAL) < 4 OR dayOfTheWeek({10470}, LOCAL) < {WEDNESDAY}
The syntax errors in your expression are:
On the other hand, I inform you that it's also possible to compare and validate the date part of a date-time value. For example, you can use the following expression to check if date-time in field {10470} contains a value with time part between 08:30 and 19:00 in JIRA server's timezone:
timePart({10470}, LOCAL) >= 08:30 AND timePart({10470}, LOCAL) <= 19:00
Don't hesitate to ask for support if you need help to write a time expression.