I've been struggling with this all day, and just cannot figure it out. I've written a vb script that connects to a QC project, and managed to get bugs, change bugs, etc. without any problems. However, I'm unable to GET user data.
I want to do a very simple thing: connect to a QC project and, given a username (US_USERNAME), return the full name (US_FULLNAME).
I cannot figure out how to interface with the USERS table, and return that.
I've scoured the documentation numerous times, and tried many different ways of getting this data, but nothing seems to work for me.
Does anybody know how I can accomplish such an easy thing?
Please forward all my mail to the corner of Pork & Beans.
If login is a string that holds the login name (stored in US_USERNAME in the USERS table), use the following construct :
<font class="small">Code:</font><hr /><pre>TDConnection.Customization.Users.User(login) .FullName</pre><hr />
To get a dictionary with all project users :
<font class="small">Code:</font><hr /><pre>
Dim ProjectUserList, SiteUsers, iUser
On Error Resume Next: Err.Clear
Set TDUsers = CreateObject ("Scripting.Dictionary")
Set ProjectUserList = TDConnection.UsersList
Set SiteUsers = TDConnection.Customization.Users
For iUser = 1 To ProjectUserList.Count
TDUsers.Add UCase(ProjectUserList(iUser)), SiteUsers.user(ProjectUserList(iUser)).FullName
Set SiteUsers = Nothing
Set ProjectUserList = Nothing
Then, to get the full name for user "login" :
<font class="small">Code:</font><hr /><pre>MsgBox TDUsers("login")</pre><hr />