Timesheet Functionality #2528
wunter8
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I wanted a way to track the amount of time I spend working on a project. Here's what I came up with.
Each time you add a child note to the timesheet, it will automatically change the title of the new child note to
IN -
orOUT -
followed by the current timestamp. After "clocking in", the timesheet's title will showON THE CLOCK
. Once you "clock out", the total amount of time spent will be added to the timesheet's title. These totals can be passed up the tree if you have nested timesheets.Features:
Example 1
Example 2
Implementation
This all works thanks to a
JS backend
script, arelation
, and alabel
.Here is the script:
To create a timesheet, add this relation to the lowest level of your nested structure:
~runOnChildNoteCreation=@js
where@js
is the link to the aboveJS backend
script.In Example 1 above, the following notes have this relation:
To sum up the totals from nested timesheets, add this label to the parent note:
#sumTimesheet
.In Example 1 above, the following notes have this label:
Since Task 3 does not have the label
#sumTimesheet
, the totals of its Sub-task 1 and Sub-task 2 are not combined into the Task 3 title nor are they added to Project 1's total.Beta Was this translation helpful? Give feedback.
All reactions