Auto-Generate Time Cards to Balance Hours for Week

Derek Jones
Tera Expert

Hello All,

 

I've been tasked with building a method so that hours are "rounded up" on time cards to 40 hours/week, proportional to the departments served. So, if a given user on a given day spent 4 hours working for "department X" and 2 hours for "department Y," the remaining 2 hours in an 8-hour day are divided proportionally at 1.33 and .66 for each department, respectively.  This is being done since most of our users are primarily dedicated to a given department and are typically on-site, so time not spent directly on a task is still effectively "on-call time."  

 

I've been building a prototype in dev, and built a flow to gather the time cards on a time sheet and add the numbers into a JSON object with an action I'm still working on to take that JSON and iterate through it to build the "on-call" time cards.  However, I was curious if anyone else had done something similar and might point me to a more OOB solution.  Our tech rep has told me about a time card policy, and I've started digging into TimeCardGenerator(), but, at first glance, I'm not clear if this is suited for the more generic case.  I'm just looking to confirm there's no simpler way to handle this; now, this is getting more complex than I was first hoping, for what that's worth.  

 

Thanks for any help!

2 REPLIES 2

Uncle Rob
Kilo Patron

How will you factor for when uses don't actually work 40 hour weeks?

It's a detail that I didn't include in the post but we make time cards for all "non-task" time, such as time off, KTLO and similar.  We're not a true cost center and our budget is based on a percentage of shared costs, meaning that at the end of the year, most of our cost to the organization is divided fully, based on our effort to each department.  In the end, we use time cards effectively just for recording time only.