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

Re: Add new user to QC Project (OTA API)

$
0
0

How exactly is your script failing? Yours seems quite legit, but below is a workflow based solution that I created. In addition it has the site user adding part, but you said the user is already in the site users.

 

Just add my script after your Customization.Load. Logout from QC project before checking if user was added.

 

NOTE: if user is already in project, exception is thrown in AddUser but if the error is ignored, then the group adding is executed.

 

----------

 

If Not tdc.Customization.Users.UserExistsInSite(username) Then
tdc.Customization.Users.AddSiteUser username, "Jane Bond", "", "", "", ""

msgbox "User added to site"
End If

tdc.Customization.Users.AddUser username

msgbox "User added to project"

Dim us
Set us = tdc.Customization.Users.User(username)
If Not us.InGroup("QATester") Then
us.AddToGroup "QATester"
End If

tdc.Customization.Commit
msgbox "User added to group"


Viewing all articles
Browse latest Browse all 14708

Trending Articles



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