Adding a project prefix

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
NightWalker
Posts: 6
Joined: 21 May 2008, 14:11

Adding a project prefix

Post 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!
deboutv
Posts: 507
Joined: 15 Jan 2007, 14:31
Location: La Ciotat, FRANCE
Contact:

Re: Adding a project prefix

Post by deboutv »

It is not possible to restart the bug id to 1 for each project.
Want more plugins to customize Mantis?
=> http://deboutv.free.fr/mantis/

Mantis: 1.1.0, 1.1.0a2
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux
NightWalker
Posts: 6
Joined: 21 May 2008, 14:11

Re: Adding a project prefix

Post 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?
giallu
Posts: 20
Joined: 06 Feb 2008, 11:34

Re: Adding a project prefix

Post by giallu »

It's not the first time I see this request. I still wonder what's the point in restarting numbering...
NightWalker
Posts: 6
Joined: 21 May 2008, 14:11

Re: Adding a project prefix

Post 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.
:)
qaeng
Posts: 1
Joined: 14 Oct 2008, 18:01

Re: Adding a project prefix

Post 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.
deboutv
Posts: 507
Joined: 15 Jan 2007, 14:31
Location: La Ciotat, FRANCE
Contact:

Re: Adding a project prefix

Post by deboutv »

I already answered, it is not possible.

The only thing possible is to change how it is displayed.
Want more plugins to customize Mantis?
=> http://deboutv.free.fr/mantis/

Mantis: 1.1.0, 1.1.0a2
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux
ghohm
Posts: 10
Joined: 22 May 2007, 08:16
Location: FRANCE

Re: Adding a project prefix

Post by ghohm »

deboutv wrote:The only thing possible is to change how it is displayed.
It could be very interesting ... but how?
deboutv
Posts: 507
Joined: 15 Jan 2007, 14:31
Location: La Ciotat, FRANCE
Contact:

Re: Adding a project prefix

Post by deboutv »

You need to patch the bug_id_format function.
Want more plugins to customize Mantis?
=> http://deboutv.free.fr/mantis/

Mantis: 1.1.0, 1.1.0a2
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux
mtraderjax
Posts: 2
Joined: 02 Aug 2010, 16:19
Location: Florida, USA

Re: Adding a project prefix

Post 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.
atrol
Site Admin
Posts: 8536
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Adding a project prefix

Post 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.
Please use Search before posting and read the Manual
atrol
Site Admin
Posts: 8536
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Adding a project prefix

Post 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.
Please use Search before posting and read the Manual
mtraderjax
Posts: 2
Joined: 02 Aug 2010, 16:19
Location: Florida, USA

Re: Adding a project prefix

Post 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!
Post Reply