How to Change a Project’s Special Number in Mantis

If you use a computer program called Mantis to keep track of bugs or problems in projects, you might want to change a project’s special number (its ID). But listen up! This is tricky and not as easy as it sounds. Mantis uses this special number for many important things inside its system. So, changing it needs very careful steps. You also really need to know that it can cause big problems if it’s not done perfectly.

This guide will tell you how Mantis uses these special project numbers. It will also explain why you usually can’t change them from the normal Mantis screens that you see. Then, it will explain how someone who knows a lot about computer memory places (databases) can change these numbers—but only if it is super, super necessary.

What These Special Project Numbers Do in Mantis?

What These Special Project Numbers Do in Mantis?

Every project you make in Mantis gets its own special number (Project ID). Mantis stores this number in its big memory place (its database), in a list called mantis_project_table. This number is like the project’s main ID card. It’s very important because Mantis uses this ID card to connect the project to many other things, like:

  • All the bug reports for that project (these are kept in another list called mantis_bug_table).
  • Which people are allowed to see and work on the project (this info is in the mantis_project_user_list_table).
  • Different versions or updates of the project (these are in the mantis_project_version_table).
  • Special settings that are only for that project.
  • Any extra tools or special information fields you might have added for that project.

Because this one special number links to so many other lists and pieces of information, changing it the wrong way can break how Mantis tracks issues. People might not be able to get into the project, and reports could stop working.

Can You Change a Project’s Special Number from the Mantis Website?

No. Mantis does not give you an option on its website pages to change a project’s special number after it’s made. You can change things like the project’s name, what it’s about, or who can see it. But the special number (the ID) that Mantis gives it cannot be changed from the usual admin screens.

Mantis creates this special number when the project is first made. It becomes locked in as a key part of how Mantis organizes everything.

How to Change the Project’s Special Number in Mantis’s Memory (Database)

How to Change the Project’s Special Number in Mantis’s Memory (Database)

If you must change a project’s special number (maybe to match numbers from another computer system, or to fix a problem after moving Mantis information from one place to another), here is how an expert can do it by working directly with Mantis’s memory (the database).

⚠️ Super Important Warning: Always, always make a full copy of your entire Mantis memory (database) before anyone tries to make these kinds of changes. If something goes wrong, you will need this copy to get your Mantis working again! This is like making a safety copy of your most important game save before trying something risky.

1. Make a Safety Copy of Mantis’s Memory (Database)

An expert should use computer tools (like mysqldump or phpMyAdmin, or tools from your website company) to make a full safety copy of all the Mantis information. If any step after this goes wrong, you will need this copy to fix things.

 

2. Log In to the Database Tool

The expert will need to use a special computer program to look at and change Mantis’s memory. Some tools they might use are:

 

  • phpMyAdmin
  • Adminer
  • MySQL CLI (this is a command-line tool)

3. Find the Special Number of the Project You Want to Change

The expert will run a special command to find the current number of the project. For example, they might type something like this to see all project numbers and names:

SELECT id, name FROM mantis_project_table;

4. Change the Special Number in the Main Project List

Let’s say the expert wants to change the project that has special number 15 to a new special number, 20. They would type a command like this:

UPDATE mantis_project_table SET id = 20 WHERE id = 15;

This command tells Mantis: “In the main project list, find the project with number 15 and change its number to 20.”

5. Change the Special Number in All Other Lists That Use It

This is a very important step! The expert must find every other list in Mantis’s memory where the old special number (15) was used to link to this project. They must change it to the new number (20) in all those places too. If they miss any, Mantis will get confused.

Here are examples of commands for some common lists:

UPDATE mantis_bug_table SET project_id = 20 WHERE project_id = 15;
UPDATE mantis_project_user_list_table SET project_id = 20 WHERE project_id = 15;
UPDATE mantis_project_version_table SET project_id = 20 WHERE project_id = 15;

The expert needs to keep doing this for any other lists, especially if you use extra tools (plugins) or have made your own special information lists for Mantis.

6. Clear Out Old Information (If Needed)

Sometimes, Mantis or other computer systems might keep copies of old information to work faster (this is called caching). The expert might need to restart the Mantis computer server or clear out these caches. This helps make sure everyone sees the changes.

Big Problems That Can Happen If You Change Project Numbers Directly

Big Problems That Can Happen If You Change Project Numbers Directly

Changing a project’s special number by hand in Mantis’s memory (the database) is very risky. Here are some bad things that can happen:

  • Broken Links: If the number isn’t changed in every single place it’s used, links between bugs, projects, and users can break.
  • People Can’t Get In: People might lose their permission to get into the project if the links are wrong.
  • Lost Information: Bug information or project version details could seem to disappear if Mantis can’t find them with the new number.
  • Extra Tools Stop Working: If you have special tools (plugins) or reports, they might get confused by the new number and stop working right.
  • Mantis Team Can’t Help: The people who make Mantis do not support changing numbers this way. So, if it breaks, they might not be able to help you fix it.

Unless the expert doing this is 100% sure they know what they are doing and have checked every single step, it’s usually much better not to try this.

Safer Things to Do Instead of Changing Project Numbers

Instead of trying the risky way of changing a project’s special number, think about these safer ideas:

  • Just Rename the Project. You can easily change the project’s name that everyone sees. Go to the Admin page in Mantis, then Manage Projects. This changes how the name looks, but it does not change the important special number that Mantis uses inside.
  • Make a New Project and Move Old Issues. You can make a brand new project. Then, an expert can help move all the bug reports and information from the old project to the new one using Mantis’s tools for moving data. This is much safer and keeps your old information safe.
  • Use Special Tags or Fields to Group Projects. If you want to group projects in a certain way or give them another kind of label, you can use Mantis’s features like custom fields or tags. This lets you organize things without changing the main special numbers.
  • Make Reports That Use a Nickname for the Number. If you need reports to show a different number for a project, an expert can write special report commands. These commands can show a nickname for the project instead of its real special number, while Mantis still uses the real number safely inside.

Last Thoughts

A project’s special number is a very basic part of how Mantis keeps its information organized. These numbers are not meant to be changed easily. But, if it’s truly needed, an expert can change them by being extremely careful and following all the right steps.

If this guide helped you understand this better, or if you have questions about your own Mantis setup (especially if you are thinking about the safer options!), please feel free to leave a comment or share this guide.