Clearquest Request

I searched for a while and could not find a single example ...

Using the C # and Clearquest API, I would like to do something as simple as running a request (for example, getting the CR list by the owner)

How can I program a CQ request?

+4
source share
2 answers

Taken from http://www.ibm.com/developerworks/forums/thread.jspa?threadID=78133

SessionClass cqSession = new SessionClass(); cqSession.UserLogon("user", "pass", "dbname", 2, ""); OAdQuerydef queryDef = (OAdQuerydef) cqSession.BuildQuery("Issue"); queryDef.BuildField("id"); queryDef.BuildField("summary"); OADQUERYFILTERNODE qfn = (OADQUERYFILTERNODE) queryDef.BuildFilterOperator(CQConstants.AD_BOOL_OP_AND); qfn.BuildFilter("description", CQConstants.AD_COMP_OP_LIKE, "foobar"); OAdResultset rs = (OAdResultset) cqSession.BuildResultSet(queryDef); rs.Execute(); 
+3
source

In addition to the answer above, the ClearQuest note provides a clearquest.bas file that contains all the constant definitions. To use this in C #, you must create a new file and copy these constant definitions into the new CQConstants class.

See https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000002903065

If you request improvement, the ClearQuest team might consider adding a C # class that you could use to define constants.

0
source

Source: https://habr.com/ru/post/1444889/


All Articles