Jump to content

Reporting on Time Spent on a Request


Martyn Houghton
 Share

Recommended Posts

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

Link to comment
Share on other sites

@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.

Link to comment
Share on other sites

@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

Link to comment
Share on other sites

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
 Share

×
×
  • Create New...