Mantis Customization Examples

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
PDDave
Posts: 4
Joined: 02 Apr 2008, 08:53

Mantis Customization Examples

Post by PDDave »

Hi Folks,

I've been asked to review some issue tracking systems for my employer and thus far Mantis seems like a very good fit for our requirements. Functionaly it will do everything we need however one reservation that has been raised is customizing the user interface and it could be a potential blocker as one key requirement is the ability to enter a new issue quickly. I know from reading the wiki and forum that customization is possible but unfortunately Im not sure to what extent (my PHP skills are minimal :-|). I was hoping that folks on the forum who have done some customization of the mantis UI could perhaps post some good screenshots so that I can provide solid examples of how Mantis can be customised and get a better idea to what extent the UI can be customised.

Dave
vboctor
Site Admin
Posts: 1293
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Re: Mantis Customization Examples

Post by vboctor »

You can easily remove non-mandatory fields (mandatory fields are summary / description) from the report / update / view pages. This requires a very simple edit of a couple of PHP files.

Through configuration you can specify the columns to be included in View Issues, Print Issues, CSV export pages. In the next version, such customization can easily be used per project, per user through and can be done for Excel export as well.
Migrate your MantisBT to the MantisHub Cloud
PDDave
Posts: 4
Joined: 02 Apr 2008, 08:53

Re: Mantis Customization Examples

Post by PDDave »

@ vboctor - Many thanks for the reply, I wasn't sure how flexible Mantis was. I also read somewhere about a propose GUI for customisation, have you ever heard of this feature?
SneakyWho_am_i
Posts: 13
Joined: 14 May 2008, 01:20

Re: Mantis Customization Examples

Post by SneakyWho_am_i »

The things that I find odd about Mantis, which you might find a blessing, or a curse, or to be inconsequential:
- many scripts only have one entry point at index.php, whereas with mantis you request a different file depending on which page you're looking at. This means that you can't use php alone if you want to make a global change to the very start and/or end of every script simultaneously. At least not in the conventional sense of just dropping something in index.php...... It threw me.
- Mantis is implemented in php, as you realise. I find this to be an advantage, personally, because php seems so straightforward and transparent to me in terms of string and array manipulation. That is probably just be me though, php is the only thing I know really well.
- Mantis doesn't seem to have templates per se. If you want to edit Mantis's interface (on a code level) then you have to actually understand how the code works: If you want to edit a string, you have to figure out which include[d file] the string came from, and which function it came from, and all that sort of thing. There is probably a straightforward way to do it, but I don't know it


If you need a hands-on example, try changing the background colours of the status-key at the bottom of the "issues" screen. Don't use any CSS til you find the HTML (because that would spoil the fun)
PRO: You don't need to look in index.php to find out which file contains the code for which action. You just find the filename from the url
CON: The html you're looking for is not actually in that file
CON: The file doesn't include any templates, or any files which seem to obviously contain any strings or templates
CON: When you guess that the html string is in html_api.php, you discover that no, it's actually not
PRO: You do find it eventually, it's not like they base64_decode() their strings before echoing them or anything, I'm just too stupid to rapidly determine where they've put them, sometimes

So it is a process of elimination. You have to sort through a list of four or five includes to figure out which one has the code you want to edit. Luckily there's not much to take in - it's normally just the same includes, so I think that you would get familiar with the code very quickly - stop looking and start remembering.

There's my take on it.
I would encourage you to get Mantis. Try it out. Spend a whole day with it if you can. If you are going to need to customize it, then don't bother editing data. I'm talking about setting up a sacrificial installation of it just so you can try hacking it. See if you can customize it as easily as you hope. My list of pros and cons makes it sound hard but it is quick and easy on the second day.
mooy
Posts: 13
Joined: 27 Jan 2008, 12:08

Re: Mantis Customization Examples

Post by mooy »

What php files should I to edit?

(What about the fields in the import page)

Mantis ver. 1.1.2

Thanks for your help in advance!
Post Reply