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

Re: Add attachment to a defect via OTA using Java Jacob

$
0
0

Hi,

I am able to retrieve all the defects from HP QC using JACOB and OTA, however unable to apply filters.

Please suggest what change needs to be done in below code.

 

ActiveXComponent hpqcCon = QCUtil.getHPQCConnection( "http://xxxx/qcbin", "xxxxx",
"xxxx", "xxx", "xxx" );
Variant var = Dispatch.get( hpqcCon, "BugFactory" );
Dispatch bugFactory = var.getDispatch();
Dispatch bugFilter = Dispatch.get( bugFactory, "Filter" ).toDispatch();
Dispatch.invoke( bugFilter, "Text", Dispatch.Put, new Object[]
{ "BG_STATUS='Open'" }, new int[1] );
Dispatch defects = Dispatch.call( bugFilter, "NewList" ).toDispatch();
int count = Dispatch.get( defects, "Count" ).changeType( Variant.VariantInt ).getInt();
System.out.println( "Total defect count::" + count );


Viewing all articles
Browse latest Browse all 14708

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>