How to create a script to change the issue status in mantis

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
lorfer
Posts: 3
Joined: 23 Nov 2015, 08:39

How to create a script to change the issue status in mantis

Post by lorfer »

I am trying to create a php script to change the status of a particular project in mantis (e.g. assigned to confirmed) without going into mantis itself
lorfer
Posts: 3
Joined: 23 Nov 2015, 08:39

Re: How to create a script to change the issue status in man

Post by lorfer »

Does anyone know how to create the script?
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: How to create a script to change the issue status in man

Post by atrol »

Keep in mind that
- there are access and workflow rules in Mantis that should not be violated by your script
- changing a status does also trigger other actions (e.g. filling the history, sending email, maybe trigger custom functions or plugin events)

There are different solutions depending on what you need:

Dirty solution: Update field in database

Clean solution 1: use the SOAP API for it
https://www.mantisbt.org/docs/master-1. ... ONFIG.SOAP

Clean solution 2: use the internal Mantis API
Start reading bug_change_status_page.php to get an impression of it
Please use Search before posting and read the Manual
lorfer
Posts: 3
Joined: 23 Nov 2015, 08:39

Re: How to create a script to change the issue status in man

Post by lorfer »

Thank you for your help. If I wanted to use SOAP API, what are some of the configurations or settings that I need to do?
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: How to create a script to change the issue status in man

Post by atrol »

There is no additional configuration needed.
SOAP API is available out of the box.
Please use Search before posting and read the Manual
Post Reply