Forum

Projeqtor Database ...
 
Notifications
Clear all

Projeqtor Database - link between the two tables "activity" and "work"

2 Posts
2 Users
0 Reactions
1,820 Views
(@fradjtc)
Posts: 1
New Member
Topic starter
 
[#5918]

Hi everybody,

I'm trying to extract the worktime consumed per ressource and per project through this SQL code below, and it works fine.

SELECT r.`fullname`, p.`name`, year(workDate), month(workDate), SUM(w.`work`)
FROM `project` p
JOIN `work` w
ON w.`idProject`= p.`id`
JOIN `resource` r
ON r.`id` = w.`idResource`
WHERE w.`workDate` BETWEEN '2019/01/01' AND '2019/03/31'*/
GROUP BY year(workDate), month(workDate), p.`name`, r.`fullname`

Now what I wish to do, is determine the worktime consumed per activity. The problem is, I couldn't find a link between both tables: activity and work. It's as if the activities in the imputation menu are only for visual purposes, the imputed worktime is actually linked to the whole project, not it's activities.

Thanks in advance for your help.


 
Posted : 17 Apr 2019 11H35
(@babynus)
Posts: 14952
Member Admin
 

link is through refType='Activity' and refId=(id of the activity).
Note that you can have some work on tickets with refType='Ticket' and refId=(id of ticket)


 
Posted : 19 Apr 2019 17H16
Share:

Scroll to Top