Code used with 1.1.4 does not work with 2.0 Fortress
Posted: 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.
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.
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);