Hey Everyone
I’m trying to create a JQL to find issues created before the last two weeks of the current month.
Doing some studying I see this is the answer:
created < startOfMonth(-2w)
This confuses me :( I am interpreting the question to be issues created before last two weeks of current month so for example we are June. So it’s asking for issues created still in June but before the last two weeks. I. e 1 June till 15 June. Is that correct?
If so, will the proposed query not give final two weeks of May results as its starts of month (June) less 2 weeks?
Thanks for any help
Hi Clayton,
My interpretation of the question is that you are right about the time period and the answer you listed doesn’t give issues in that time period. It should use endOfMonth and not startOfMonth.
You are welcome!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Clayton
Welcome to the Atlassian community.
You are partially correct.
If the current month is any date in June then the query will return everything created before May 17 - the start of the current month minus two weeks.
If you want the issues created before the last two weeks of the current month then you need to use
created < endOfMonth(-2w)
If you want to limit that also to only issues created in the current month, excluding everything created in previous months then you would use
created < endOfMonth(-2w) and created > startOfMonth()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill thanks for that! It’s strange as that is the question and the answer from Atlassian training content. I therefore felt that maybe I was interpreting that question incorrectly :)
I read the question that if we are in June its essentially asking for issues created in first two weeks of June (Issues before the last two week in June which would be last two weeks :) )
Would you agree with that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can't attempt to interpret the question without the complete text of the question and any available context around the question.
Is it a question presented with multiple choices from which the answer must be selected?
What is the source of the question (link to the training material)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill for some reason I cant post the question here as it says I have already asked something similar :)
Its all good I do understand your answers though and did some tests.
Thanks for the welcome :)
Are questions we post to a specific group also visible to the rest of the community or will people only in that group see them?
Thanks!
Clayton
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Clayton,
You may need to add one more clauses, to get the actial period you require.
create < startofmonth(-2w) (if we are in June) = created before startofmonth(-2w), which is designed to give you all the tickets created before the 2 weeks before the start of month.
If you want the final two weeks of the previous month, you can create:
created >= startofmonth(-2w) and created < startofmonth()
Hope I have that right.
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I should have refreshed the page :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Cheers @Mark Higgins
I read the question that if we are in June its essentially asking for issues created in first two weeks of June (Issues before the last two week in June which would be last two weeks :) )
Do you agree?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Recommended Learning For You
Level up your skills with Atlassian learning
Learning Path
Get started with Jira Software
New to Jira Software? These short, self-paced courses will teach you what you need to know to get up and running quickly.
The Beginner's Guide to Agile in Jira
Learn what agile, kanban, and scrum are and how agile works in Jira Software.
Realizing the Power of Jira Reporting and Dashboards
Use out-of-the box reporting and dashboard capabilities to view and assess progress and bottlenecks within projects.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.