Page 1 of 1

Code used with 1.1.4 does not work with 2.0 Fortress

Posted: Fri Jan 22, 2010 1:10 pm
by DetroitJ
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.

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

Posted: Fri Jan 22, 2010 2:01 pm
by jeremy_sg
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.

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

Posted: Mon Jan 25, 2010 8:35 am
by Beth
Your email has been received. Thank you.

F: 218914