Hello,
I need to list the remaining promotion notices to create a report for the owner.
the aim is to send an email to the persons which have not already vote for the concerned promotion notices.
this mail have to be sent evreyday untill all the required votes have been done.
actually there is a rule in the process which send an email to the owner of the promotion notice after one day if the process is still running (missing votes), but this can't be send again if the process is still runiing the day after.
I tried then to query the database to create this list but i don't find the relation between the Promotionnotice table and the WFProcess one.
here is what i have done at this time :
List of the promotion notices and the assigned persons using the following tables :
Team,
RolePrincipalmap, to ignore the owner of the promotion notice by filtering on the Role column
Wtuser, to get the name of the assigned persons
Promotionnotice, to get the Promotionnoticenumber, the Createstampa2, and the name of the promotion notices
WFProcess, to get informations about the associated process
I need to have the votes of the assigned user for each Promotion notice to get them out of the sent email recipient list.
does somebody know how to get this missing information ?
thanks for the future help.
the actual SQL query that i build :
Select
Pn.Promotionnoticenumber, pn.ida2a2, Pn.Createstampa2, Pn.Name,
Pr.Name,
Usr.Name,
From
Team Tm
left Outer Join Roleprincipalmap Rpm On Tm.Ida2a2 = Rpm.Ida3a4
Left Outer Join Wtuser Usr On Rpm.Ida3b4 = Usr.Ida2a2
left Outer Join Promotionnotice Pn On Tm.Ida2a2=Pn.Ida3teamid
Left Outer Join Wfprocess Pr On Tm.Ida2a2=Pr.Ida3teamid
Where
Rpm.Ida3b4 Is Not Null
And Pn.Statestate ='UNDERREVIEW'
And Pn.Maturitystate ='DIFFUSE'
And Rpm.Role <> 'OWNER'