Page 1 of 1

Reporting issue using REST API fails for one project but works for another

Posted: 13 Jun 2024, 10:40
by ntushar
Hello,

We use MANTISBT version 2.25.5. We report issues using MantisBT web interface and also using REST API. while reporting issue using REST API for a project with any defined versions, issue reporting does not work and we see below error.

400 Version '7.0' does not exist in project 'Development'

However when i report same issue using Mantis web interface using version 7.0 it works without any issues.

When checked with mysql query log i understand that when it fails using REST API below query is fired

SELECT * FROM mantis_project_version_table WHERE id=7

When it works from Mantis web interface below query is fired
SELECT * FROM mantis_project_version_table WHERE project_id = 14

In short, When using from REST API it should use project_id instead of id which does not seem to be the case.

Can anyone help me and explain me why we are getting this error from REST API.

Regards,
Tushar

Re: Reporting issue using REST API fails for one project but works for another

Posted: 14 Jun 2024, 15:07
by atrol
I didn't have a deeper look or tried, but as a first step you should upgrade to current latest 2.26.2 version.
In best case, this fixes the issue as a lot of REST related source code was changed in 2.26.x.
If not, this is a better point to start, as there will be no hotfixes for 2.25.x.

Re: Reporting issue using REST API fails for one project but works for another

Posted: 02 Aug 2024, 05:18
by ntushar
We have now upgraded to MantisBT version 2.26.2 but we still have the same issue as explained below.

We report issues using MantisBT web interface and also using REST API. while reporting issue using REST API for a project with any defined versions, issue reporting does not work and we see below error.

400 Version '7.0' does not exist in project 'Development'

However when i report same issue using Mantis web interface using version 7.0 it works without any issues.

When checked with mysql query log i understand that when it fails using REST API below query is fired

SELECT * FROM mantis_project_version_table WHERE id=7

When it works from Mantis web interface below query is fired
SELECT * FROM mantis_project_version_table WHERE project_id = 14

In short, When using from REST API it should use project_id instead of id which does not seem to be the case.

Can anyone help us to resolve this issue.

Regards,
Tushar