Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,300,678
Community Members
 
Community Events
165
Community Groups

How to pass startDate and endDate in URL

When i run a report in JIRA, i can put the start and end dates in the parameters in its configuration but then, when i run the same report the next day i have to enter the start and end date again.

I want to do a shortcut in my web browser using the URL generated by the JIRA report but i would then need to have a automatic start and endate like startOfWeek () and endOfWeek () parameters in the URL instead of having fixed start and end dates.

Now, what i tried is :

https://jira.it.volvo.net/secure/TimesheetReport.jspa?reportKey=jira-timesheet-plugin%3Areport&selectedProjectId=14750&reportingDay=0&startDate%3E=startOfWeek(+1d)&endDate%3C=startOfWeek(+6d)&targetUser=ub60220&projectRoleId=&projectid=14750&filterid=&priority=&commentfirstword=&sum=day&groupByField=customfield_13010&collapseFieldGroups=true&sortBy=&sortDir=ASC&Next=Next

 

but what i get is not the right date range which from April29th to May 5th and today we are May 5th.

 

Maybe something is wrong in my syntax.

 

Thanks

Tony

 

1 answer

Hello Andriy,

I looked and the 'reportingDay' doesn't help me get ...

...show time spent for the current week, up to next Monday.

It always goes back to last week.

What i want to achieve is to see the current week, from Monday to Friday no matter what day i run the report.

Thanks

Tony

Hm, looks like you should not pass any dates or reportingDay, it is supposed to show current week by default.

No, if i remove all this, it gives me last Friday to today which is not the current week summary.

please try adding offset=1, i.e. reportingDay=1&offset=1

Sorry, not changing

So, today to get this week's times, i have to push this in my URL ...

&reportingDay=0&startDate=2022-05-01&endDate=2022-05-07

 

instead of entering the start and end dates everytime, I was expecting to enter something like ...

&reportingDay=0&startDate=startOfWeek()&endDate=EndOfWeek()

 

so when i would use my shortcut in my browser, i would always get the current week times.

but it doesn't work. 

It's like the system doesn't recognize the startOfWeek() or EndOfWeek() statments and it then puts last week Friday up to today which is not the current week.

Sorry, it appears numOfWeeks=1 is needed to make it work, and reportingDay=2 for Monday, e.g.

http://localhost:2990/jira/secure/TimesheetReport.jspa?reportKey=jira-timesheet-plugin%3Areport&weekends=true&reportingDay=2&numOfWeeks=1Screenshot 2022-05-06 at 8.21.18.png

 

And if you need next week, add offset=1, it works when there is numOfWeeks param.

Actually, I've got it from gadget, as described in the doc, I've sent initially.

Note, the easiest way to compose correct report url is to click Details link in corresponding gadget, when it shows variable time window you'd like to get in the report.

Thanks, it works !  

I tried to find this 'Details' link but couldn't find it.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you