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);