Page 1 of 1

Adding a project prefix

Posted: 21 May 2008, 14:25
by NightWalker
Hello,

I'm an administrator of our Bug Tracking website.
I have set up a bug tracking site which is available for multiple partners.
They each have a different project assigned.

I have noticed that the bug numbers posted in 1 project also increment the bugnumber for the other projects.
I would like to add a prefix to a project to solve this issue and still maintain a unique number.
Ex: project 1 has prefix "comp_a"
project 2 has prefix "comp_b".

If i would post a bug in project 1 the bugnumber would look like comp_a000001.
If i would post a bug in project 2 the bugnumber would look like comp_b000001 instead of 0000002.

How can i do this?


Thanks!

Re: Adding a project prefix

Posted: 22 May 2008, 06:39
by deboutv
It is not possible to restart the bug id to 1 for each project.

Re: Adding a project prefix

Posted: 22 May 2008, 08:07
by NightWalker
I don't understand. We have another "outdated" Mantis bugtracking project running which uses these prefixed and it does exactly what i want from it.
The problem is that the webmaster isn't available anymore and i have no access to the sources.

Is there any other "fix" you can recommend?

Re: Adding a project prefix

Posted: 11 Jul 2008, 06:08
by giallu
It's not the first time I see this request. I still wonder what's the point in restarting numbering...

Re: Adding a project prefix

Posted: 11 Jul 2008, 15:46
by NightWalker
Because this bugtracker supports projects for different development parties.
When i log 10 bugs in project A (owned by partner A) and i log 1 bug in project B (owned by partner B) it files as bug 11.
:)

Re: Adding a project prefix

Posted: 14 Oct 2008, 18:04
by qaeng
Hey NightWalker, did you ever get an answer to this one? We want to restart bug number per project as well. Would appreciate anything you got on this.

Re: Adding a project prefix

Posted: 15 Oct 2008, 06:31
by deboutv
I already answered, it is not possible.

The only thing possible is to change how it is displayed.

Re: Adding a project prefix

Posted: 15 Oct 2008, 08:12
by ghohm
deboutv wrote:The only thing possible is to change how it is displayed.
It could be very interesting ... but how?

Re: Adding a project prefix

Posted: 16 Oct 2008, 06:33
by deboutv
You need to patch the bug_id_format function.

Re: Adding a project prefix

Posted: 02 Aug 2010, 18:01
by mtraderjax
Will v.1.2.2. now allow the addition of a project prefix as outlined by NightWalker? We are considering a switch to Mantis, and this was a feature we used in our former software.

Re: Adding a project prefix

Posted: 02 Aug 2010, 19:59
by atrol
Some thoughts why I think this is not a good idea
http://www.mantisbt.org/forums/viewtopi ... 30&p=29992

deboutv wrote that display can be changed.
This is true and since version 1.2 there is an event for this which can be used to write a plugin.
http://docs.mantisbt.org/master/en/deve ... REF.OUTPUT
So there is no longer the need to patch a file which is delivered with standard MantisBT.

Re: Adding a project prefix

Posted: 02 Aug 2010, 20:26
by atrol
Someone wrote this plugin http://git.mantisforge.org/w/CustomID.git
From the readme
Allows to display the contents of a custom field instead of the BugID. In the configuration you have to choose Project, Custom Field and you can add a prefix that is added to the value in order to make it distinguishable from real bug ids.

Re: Adding a project prefix

Posted: 02 Aug 2010, 22:44
by mtraderjax
Based on atrol's helpful insight, we're now leaning away from using a project prefix before the BugID. If we decide to re-examine this, we'll certainly follow up on the information provided. Thank you for your feedback!