Page 2 of 2
Re: How do I start?
Posted: Mon Dec 18, 2017 3:06 pm
by dbaltz
Yes. I'm logged into the server and also Dragnet.
I tried just reading the open items and it throws the same exception.
Code: Select all
try
{
MantisItemExpanded[] openItems = ItemTrackingOperations.ProcessCommandListOpenFortressItems(projects[0].Name);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
Re: How do I start?
Posted: Mon Dec 18, 2017 3:28 pm
by dbaltz
It looks like
ServerOperations.client.ClientInstance is null.
Here is how I connect to the server:
Code: Select all
VaultConnection con = new VaultConnection();
Excel.Application objexcel;
public Form1()
{
InitializeComponent();
con.InitService(VaultConnection.AccessLevelType.Client);
con.InitDragnetService();
con.Login("http://tis-sa-ack1/VaultService", "[username]", "[pwd]");
if (con.LoggedIntoDragnet == false)
con.InitDragnetService();
Afterwards, the con._bConnected and con._bLoggedIntoDragnet both show true.
Re: How do I start?
Posted: Mon Dec 18, 2017 3:48 pm
by jclausius
Ahh. OK. It might be something in your login code, as the connection object is not meant to be used externally.
Since you have the API downloaded, can you load / and debug the command line project? On the arguments, have it login and run the LISTPROJECTS command. If you step through the command line, it will have the steps you'll want to use to login... Specifically calling ServerOperations.Login().
Or, if you want, you can trace through from bool VaultCmdLineClient.ProcessCommand(Args curArg) up to and including the call to ItemTrackingOperations.ProcessCommandListFortressProjects();
Re: How do I start?
Posted: Mon Dec 18, 2017 4:43 pm
by dbaltz
Yes, It appears that the global scope of the connection is the problem.
I have successfully validated an item!
Re: How do I start?
Posted: Mon Dec 18, 2017 5:05 pm
by jclausius
Congrats!!
Re: How do I start?
Posted: Mon Dec 18, 2017 5:13 pm
by dbaltz
Everything is working now. Thanks for the help.
Re: How do I start?
Posted: Mon Dec 18, 2017 5:39 pm
by dbaltz
One last question:
How do I delete my test items from the work item project? Is there a way to delete the entire Project and entries?
Re: How do I start?
Posted: Tue Dec 19, 2017 9:10 am
by jclausius
Deleting a project is an administrative type function.
You will need to log into the Vault Admin web site using a login with administrative permissions. Next, click the 'Admin' link across the top. Click the "Item Tracking Projects" on the left hand side. You should see a list of projects which you can delete by clicking the red 'X' to the right.
Re: How do I start?
Posted: Tue Dec 19, 2017 9:34 am
by dbaltz
Thanks.
Re: How do I start?
Posted: Tue Dec 19, 2017 11:52 am
by jclausius
NP!