Jump to content

Recommended Posts

Posted

I am looking to report on the time spent on a request, similar what is displayed on the Request form. Is this dynamically calculated from the time sheet entries or is the total stored on the request record/entity itself?

Cheers

Martyn

Posted
1 hour ago, Martyn Houghton said:

time spent on a request, similar what is displayed on the Request form

Can you explain the difference between the request and request form? I don't understand what area are you talking about.

Cheers,

Daniel

Posted

Got you now @Martyn Houghton

The entire panel is a plug-in from Timesheet Manager app and the Service Manager doe snot have that data.

I can show  you how that query works, but it will have to be  a JOIN probably to get that Total Time. 

Let me know.

Thanks,

Daniel.

Posted

@Martyn Houghton, the query:

SELECT
	SUM(val.h_minutes) as sum
FROM
	h_timesheet_values val 
WHERE 
	val.h_related_urn='urn:sys:entity:com.hornbill.servicemanager:Requests:PM00000048'

* PM00000048 is the Request ID

That should give you the amount of minutes that were spent on that specific request.

Hope that helps.

Daniel.

Posted

@Daniel Dekel

Just tweaked the SQL a bit and re-posting for others in the future, where you want to report on multiple requests and group the totals.

SELECT
	h_related_urn,SUM(val.h_minutes) as sum
FROM
	h_timesheet_values val 
WHERE 
	val.h_related_urn in 
	('urn:sys:entity:com.hornbill.servicemanager:Requests:IDXIN00048750',
	'urn:sys:entity:com.hornbill.servicemanager:Requests:IDXIN00050908',
	'urn:sys:entity:com.hornbill.servicemanager:Requests:IDXIN00051329',
	'urn:sys:entity:com.hornbill.servicemanager:Requests:IDXIN00050713')
	Group by h_related_urn

Cheers

Martyn

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...