Replicate the previous Time Tracking functionality with automations #19
-
My team used the Time Tracking functionality extensively in Cerb < 9.x for tracking productivity and (more importantly) billing. We're working to replicate the functionality with automations in Cerb 10 and thought others may be trying to do the same. For the record, I'm not a developer and this is my first stab at creating an automation, so it's admittedly messy code. I've attached what we have so far with a quick summary below: What is working:
What is not working:
Toolbar KATA:
Automation:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Currently, when I try to add an entry, I get an error that context is not an editable field. If I leave it blank or leave it out, I get an error that context is required. Looking at the description of comments (here), it looks like there's an author_context and target_context but I'm not sure which it's talking about. I'm using record.create (details here) to try to create the record. |
Beta Was this translation helpful? Give feedback.
-
Use: # Create a comment on the time tracking entry
record.create/comment:
output: new_comment
inputs:
record_type: comment
fields:
author__context: worker
author_id: {{worker_id}}
comment: test comment
target__context: time_entry
target_id: {{linked_time_entry.id}} Main differences:
|
Beta Was this translation helpful? Give feedback.
-
This has been drastically simplified in the 10.1 update: |
Beta Was this translation helpful? Give feedback.
Use:
Main differences:
author__context
(two underscores, uncommented)target__context
(two underscores, uncommented){{linked_time_entry.id}}
for thetarget_id
context
(it'starget__context
)