You are not logged in.

#1 Nov 4/2009 11:09 am

jacobpatton
New Member
Registered: Nov 4/2009
Posts: 4

Orphaned time entries appear in API requests but not viewable on web

I've just noticed something that seems like a bug to me, but I turn to you guys at FreshBooks in case this is a "feature" I'm overlooking:

When requesting time entries via API (using the time_entry.list method), all time entries are returned, regardless of whether they're associated with deleted clients or projects.  The only way to identify these "orphaned" time entries is to follow up with a request for their associated clients or projects to see whether their parent client/project are active or deleted.

This functionality is a hindrance for my organization, because we're using the API to collect time entries to deduct from our client's support retainers and to automatically email clients in danger of overrunning their allotted hours for the month.  Had I not spotted the orphaned time entries appearing in the API results, it would have been very easy to count these hours against our clients' retainers. 

What complicates the matter is that the orphaned time entries are not viewable via the FreshBooks web interface, but instead they're available only via API, as far as I can tell.

It seems to me that FreshBooks should perform a cascading delete on associated projects and time entries if a client is deleted (with copious warnings to the user that this will happen).  Failing that, the Time Tracking area of the website should list the orphaned time entries in an "archived" pane, like in the Clients area of the site.

Could someone please explain to me whether I've found a bug, a peculiarity, or if this is the intended behavior of the API -- and if it is, the reasoning behind it?

Thanks in advance for your help,

Jacob Patton

Offline

 

#2 Nov 4/2009 1:55 pm

Fresh Grace
The Invoice of Reason
Registered: Jul 21/2008
Posts: 887

Re: Orphaned time entries appear in API requests but not viewable on web

Hey there Jacob!

Welcome to the forums!!

Alright, I asked one of our API developers about this, and this is the way it's supposed to work.  This is because these time entries *are* viewable from the FB web interface.  You can see these entries on your timesheet (if you go back to the month that they were entered) and you are also able to see them if you run a report for all time entries in a particular date range.

So, all time entries will be returned on a time_entry.list unless the time entries themselves were deleted.

If you wanted, you could write a script that will delete all the time entries that still exist for projects or clients that you don't want to keep them for.  This way, all your time entry calls will be correct going forward.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB