Page 1 of 1

ME fails to list/accept Mantis subprojects

Posted: Fri Feb 22, 2019 8:51 pm
by slemmnord
Hi Mathias!

I have a Mantis server with several levels of subprojects. ME GUI only offers projects in dropdown from first level. When i manually write the project name in .mes file, it is also ignored because ME tries to retrieve the project ID but fails (the report is posted under first project instead).

It seems to me the problem is in parsing the reply to "mc_projects_get_user_accessible". It further looks like the problem could be empty subprojects listings like these "<subprojects SOAP-ENC:arrayType="ns1:ProjectData[0]" xsi:type="SOAP-ENC:Array"/>" - notice there is no "</subprojects>" tag. It is terminated with / in same tag. ExtractXml2 seems to be trying to find normal tag closing only.
I may be wrong in my assumption because ExtractXml procedure is hard to understand.

I'll attach sample data received to s1 from "if MantisCall('mc_projects_get_user_accessible', s1, true) then begin". It is not raw data, i sanitized it and made it shorter but xml is valid.

So what i'm getting is:
Level 1 project 1
Level 1 project 2

What would be correct is:
Level 1 project 1
Level 2 project 1
Level 3 project 1
Level 3 project 2
Level 3 project 3
Level 2 project 2
Level 2 project 3
Level 1 project 2

Help, please :)
test.zip
not really zip file.. the forum did not accept xml or txt. this is just text file.
(8.58 KiB) Downloaded 333 times

Re: ME fails to list/accept Mantis subprojects

Posted: Fri Feb 22, 2019 8:53 pm
by slemmnord
Forgot to mention i'm on version 4.0.21 but i subscribed to v5 so i'm a good citizen :P

Re: ME fails to list/accept Mantis subprojects

Posted: Mon Feb 25, 2019 9:13 am
by madshi
Is the concepts of subprojects a new feature in Mantis? I don't think I was aware of that this before.

I'll put this on my to do list, but it might take a bit until I get to it.

Re: ME fails to list/accept Mantis subprojects

Posted: Mon Feb 25, 2019 3:40 pm
by slemmnord
Nope, not new concept. ME is parsing for subprojects (there are calls like ExtractXml('<subproject|item'...) but for some reason it cant go deeper than first level.