Code used with 1.1.4 does not work with 2.0 Fortress

Post your questions regarding using the Vault and Fortress API in your programs.

Moderator: SourceGear

Post Reply
DetroitJ
Posts: 19
Joined: Fri Sep 26, 2008 12:10 pm
Location: Morrisville, NC
Contact:

Code used with 1.1.4 does not work with 2.0 Fortress

Post by DetroitJ » Fri Jan 22, 2010 1:10 pm

Hello,

I have some code that worked with the 1.1.4 release of fortress but it doesn't seem to work using the 2.0 API. Below is the code I was using to grab Fortress work items to build a "Release Notes" page.

Code: Select all

 MantisLib.MantisItemExpanded[] arItems;

MantisLib.MantisItemQueryFilter qf = new MantisLib.MantisItemQueryFilter();
qf.Projects = new int[] { int.Parse(ConfigurationManager.AppSettings["FortressProjectID"]) };
qf.Statuses = new int[] { int.Parse(ConfigurationManager.AppSettings["StatusID"]) };
qf.ItemAccessType = MantisLib.AccessType.Public;
MantisLib.MantisItemQuerySort[] qs = { new MantisLib.MantisItemQuerySort(MantisLib.ItemSortType.CUSTOM2,false),
                                          new MantisLib.MantisItemQuerySort(MantisLib.ItemSortType.ITEMID,true)};
qf.Sorts = qs;
arItems = ItemTrackingOperations.ProcessCommandQueryFortressItems(qf, true);
If I comment out the qf.Statuses line I can get all items for the project, but I want to be able to retrieve only specific Status Codes. Any help would be appreciated.

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: Code used with 1.1.4 does not work with 2.0 Fortress

Post by jeremy_sg » Fri Jan 22, 2010 2:01 pm

What does it return when you leave Statuses specified?

What if you hard-code the status number?

If you continue to have problems, please email support at sourcegear.com ATTN: jeremy with a link to this thread.
Subscribe to the Fortress/Vault blog

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Code used with 1.1.4 does not work with 2.0 Fortress

Post by Beth » Mon Jan 25, 2010 8:35 am

Your email has been received. Thank you.

F: 218914
Beth Kieler
SourceGear Technical Support

Post Reply