Skip to content

Instantly share code, notes, and snippets.

@grenoult
Created June 4, 2018 23:45
Show Gist options
  • Save grenoult/ac78c7e20de56e51bf077e7f38b3a982 to your computer and use it in GitHub Desktop.
Save grenoult/ac78c7e20de56e51bf077e7f38b3a982 to your computer and use it in GitHub Desktop.
Jira: get worklogs of last 7 days. To copy as a bookmark
javascript:(function(){
function formatDate(d) {
return d.getFullYear() + "-" + ("0"+(d.getMonth()+1)).slice(-2) + "-" + ("0" + d.getDate()).slice(-2);
};
var today = new Date();
var aWeekAgo = new Date(new Date().getTime() - 518400000); /* 6 days ago */
location.href = 'https://elmolearning.atlassian.net/plugins/servlet/ac/is.origo.jira.tempo-plugin/tempo-my-work#!/timesheet/?columns=WORKED_COLUMN&dateDisplayType=days&from='+formatDate(aWeekAgo)+'&groupBy=issue&periodKey&periodType=LAST_DAYS&subPeriodType=MONTH&to='+formatDate(today)+'&viewType=TIMESHEET';
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment