Quantcast
Channel: All Quality Center / ALM Practitioners Forum posts
Viewing all articles
Browse latest Browse all 14708

Re: Problem OTAClient filter - listResults seems to be limited to 30

$
0
0

Thank you very much for your answer.

The aim of what I want to get is an extract from BUG table.

I have to use the objets Bug / BugFactory, AuditRecord / AuditRecordFactory , AuditProperty / AuditFactory.

Here is my query I have to translate with the objects of OTACLient:

Select AL.AU_time as DateAssigned, AU_USER,AP.AP_OLD_VALUE, AP.AP_NEW_VALUE ,AP_FIELD_NAME,
BG_BUG_ID,BG_STATUS,BG_RESPONSIBLE,BG_PROJECT,BG_SUBJECT,BG_SUMMARY,BG_REPRODUCIBLE,BG_SEVERITY,BG_PRIORITY,BG_DETECTED_BY,BG_DETECTION_DATE,BG_CLOSING_DATE , BG_ESTIMATED_FIX_TIME
from bug B , Audit_log AL , AUDIT_PROPERTIES AP
where
(AL.AU_entity_id = B.BG_Bug_ID
And AL.AU_entity_type = 'BUG'
And AP.AP_ACTION_ID = AL.AU_ACTION_ID
And AP_FIELD_NAME = 'BG_RESPONSIBLE'
AND AP.AP_NEW_VALUE in (<user>)
)

ORDER BY B.BG_BUG_ID, DateAssigned

 

We do not have the rights to use Command object for executing queries.

 

Here is the code I have done :

 

Set bugfilter = BugFact.Filter
'set the filter

Set Bglist = bugfilter.NewList()
Debug.Print ("-----------------")
Debug.Print Bugs numbers")
Debug.Print ("-----------------")
Debug.Print (Bglist.Count)
For Each objBug In Bglist
AuditRecordFilter.Filter("AU_entity_type") = "BUG"
AuditRecordFilter.Filter("AU_entity_id") = objBug.Field("BG_BUG_ID")
Set AuditRecordList = AuditRecordFilter.NewList()
'Debug.Print ("Audit logs number")
'Debug.Print (AuditRecordList.Count)
For Each objAR In AuditRecordList

AuditPropertyFactFilter.Filter("AP_FIELD_NAME") = "BG_RESPONSIBLE"

AuditPropertyFactFilter.Filter("AP_ACTION_ID") = objAR.ActionID
Set AuditPropertyList = AuditPropertyFactFilter.NewList()
'Debug.Print ("-----------------")
'Debug.Print ("Audit properties numbers")
'Debug.Print ("-----------------")
'Debug.Print (AuditPropertyList.Count)
'Exit sub - workaround
'Sortie si supérieur à 30 - bug OTACIENT
If AuditPropertyList.Count > 30 Then
MsgBox "Too many datas - OTA bugs"
tdc.Disconnect
Exit Sub
End If


For Each objAP In AuditPropertyList
'Walk through the list
Debug.Print (objAR.Field("AU_time"))
Debug.Print (objAP.Field("AU_USER"))
Debug.Print (objAP.NewValue)
Debug.Print (objAP.OldValue)
Debug.Print (objAP.Field("AP_FIELD_NAME"))
Debug.Print (objBug.Field("BG_BUG_ID"))
Debug.Print (objBug.Field("BG_STATUS"))
Debug.Print (objBug.Field("BG_RESPONSIBLE"))
Debug.Print (objBug.Field("BG_PROJECT"))
Debug.Print (objBug.Field("BG_SUBJECT"))
Debug.Print (objBug.Field("BG_SUMMARY"))
Debug.Print (objBug.Field("BG_REPRODUCIBLE"))
Debug.Print (objBug.Field("BG_SEVERITY"))
Debug.Print (objBug.Field("BG_PRIORITY"))
Debug.Print (objBug.Field("BG_DETECTED_BY"))
Debug.Print (objBug.Field("BG_DETECTION_DATE"))
Debug.Print (objBug.Field("BG_CLOSING_DATE"))
Debug.Print (objBug.Field("BG_ESTIMATED_FIX_TIME"))
Debug.Print ("-----------------")

Next
Next
Next

 

 

It works if we have an history on each bug for the assignation (BG_RESPONSIBLE) that is lower than 30, which might be very rare.

 

 

 

 

 

 


Viewing all articles
Browse latest Browse all 14708

Trending Articles