(created <= startOfWeek(“-5d”) AND created >= startOfWeek(“-6d”)) OR (created <= startOfWeek(“-12d”) AND created >= startOfWeek(“-13d”)) OR (created <= startOfWeek(“-19d”) AND created >= startOfWeek(“-20d”))
This fails with the following error message.
Duration for function 'startOfWeek' should have the format (+/-)n(yMwdm), e.g -1M for 1 month earlier.
The following query without quotations returns the expected issues.
(created <= startOfWeek(-5d) AND created >= startOfWeek(-6d)) OR (created <= startOfWeek(-12d) AND created >= startOfWeek(-13d)) OR (created <= startOfWeek(-19d) AND created >= startOfWeek(-20d))
I believe its because that's a syntax requirement.
Yes, I thought the quotes were a syntax requirement.
This is a sample form an Atlassian blog post https://www.atlassian.com/blog/jira-software/jql-secrets-and-shortcuts
I tried it but it did not work until I removed the quotes.
I am searching for some documentation relating to this...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
(created <= startOfWeek(“-5d”) AND created >= startOfWeek(“-6d”)) OR (created <= startOfWeek(“-12d”) AND created >= startOfWeek(“-13d”)) OR (created <= startOfWeek(“-19d”) AND created >= startOfWeek(“-20d”))
When I enter the above query Jira returns:
"Duration for function 'startOfWeek' should have the format (+/-)n(yMwdm), e.g -1M for 1 month earlier."
When the query is entered without the double quotes it returns the expected results.
(created <= startOfWeek(-5d) AND created >= startOfWeek(-6d)) OR (created <= startOfWeek(-12d) AND created >= startOfWeek(-13d)) OR (created <= startOfWeek(-19d) AND created >= startOfWeek(-20d))
I have not found an explanation for this behaviour. Are there any JQL experts who understand this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I got the same error with your statement but no error when I removed all quotes.
(created <= startOfWeek(-5d) AND created >= startOfWeek(-6d)) OR (created <= startOfWeek(-12d) AND created >= startOfWeek(-13d)) OR (created <= startOfWeek(-19d) AND created >= startOfWeek(-20d))
I got no results, but that's because of what's on my instance :)
EDIT - and that's what you originally wrote.
Apologies, its been a long monday and I could use a pint...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK this is bizzarre - I can't explain this
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@[deleted]I figured it out! Your quote character is incorrect.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good eye!
If I accept your original answer will people be directed to that? Or do you need to submit your solution as a new answer so it's more clear?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There's only the one answer with a lot of replies. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.