openPDC
openPDC copied to clipboard
Completeness reports not working
Replicated in 2.9.130+. The Expected measurements statistics (ST5) reports 0 expected measurements for a Device.
Workaround: Manually change Adder
in measurement table. Note that this would need to be reversed when a fix is applied.
UPDATE Measurement SET Measurement.Adder =
(SELECT COUNT(M.SignalReference) * D.FramesPerSecond*10
FROM [openPDCv29].[dbo].[Device] AS D
INNER JOIN Measurement AS M ON M.DeviceID = D.ID
WHERE M.SignalReference LIKE D.Acronym + '-%' AND M.SignalTypeID <> 8 AND M.SignalTypeID <> 11
GROUP BY D.ID, D.IsConcentrator, D.FramesPerSecond HAVING D.IsConcentrator = 0 AND D.ID = Measurement.DeviceID
) FROM Measurement
WHERE SignalReference LIKE '%PMU-ST5'