Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Howto access starteam in javascript ?

40 views
Skip to first unread message

MarLam

unread,
Sep 18, 2007, 10:49:38 AM9/18/07
to

Hello all,

Does anyone know how to access to Starteam by SDK to see my change request in javascript ?

Thanks
MarLam

Tom Margrave

unread,
Sep 19, 2007, 2:13:39 PM9/19/07
to MarLam
MarLam,

You might want to look at the sample with the SDK for examples. My
examples are located at:

C:\Program Files\Borland\StarTeam SDK 2006\samples\CRWatcher\JScript

Tom
STAdvice a-t Unionpoint.net

MarLam

unread,
Sep 19, 2007, 5:36:30 PM9/19/07
to

Thanks a lot Tom !

With your example i have complete my code and it's works fine !

// ----------------------------------------------------------------------------
// Finds ChangeRequest open for automated test.
// ----------------------------------------------------------------------------
function getCR(view)
{
var server = view.Server;
var strType = server.TypeNames.CHANGEREQUEST;
var type = server.typeForName(strType);
// search ChangeRequests.
for (var ep = new Enumerator(view.RootFolder.GetItems(strType)); !ep.atEnd(); ep.moveNext())
{
var CR = ep.item();
//document.write(CR.Number+" "+CR.Synopsis+"<BR/>");
if (CR.ExternalReference.toLowerCase().match("automated test"))
{
if (CR.GetStatusDisplayName(CR.Status)=="Open")
{
// All CR open with automated test string in External Reference
g_strAllOpenCR +="<LI>"+CR.Number + " " + CR.ExternalReference + " " + CR.GetStatusDisplayName(CR.Status) + CR.Synopsis + "</LI>" + "<BR/>";
alert(g_strAllOpenCR);
}
}
}
}

Merci beaucoup Tom!
Mario

0 new messages