report_create: Create and save a report from Toggl

Description Usage Arguments Value Examples

Description

This high-level function logs onto InsideNCI, get your toggl report for the indicated period end date and formats it ('get_toggl_entries()'), and inserts it into a timesheet. Lastly it saves the timesheet so that you can open it up and do a quick QC or add comments before it is submitted.

Usage

1
2
report_create(user = Sys.info()[["user"]], period_end_date = get_Sat(),
  locality = "CO-BOULDER", round = 5)

Arguments

user

the user's Navigant username

period_end_date

the period end date to make the timesheet for, defaults for the previous Saturday but can run the next saturday easily by setting this value to 'get_Sat(prev = F)'

locality

the NCI locality, e.g. CO-BOULDER, CA-SF, or IL-C

round

an integer, the number of minutes to round toggl time entries to. Default 5 minutes.

Value

the resultant html session, can be parsed for errors

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# for the last timesheet
report_create() # NAVtrackr will guess your username based on the session.
# or
report_create("dzafar")

# for the upcoming timesheet
report_create(period_end_date = get_Sat(prev = F))

# for folks outside of the Boulder office, locality should be specified
report_create(locality = "CA-SF") # for SF office

sdanielzafar/NAVtrackr documentation built on May 29, 2019, 9:31 a.m.