plugin help

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
asettico
Posts: 3
Joined: 17 Sep 2010, 15:08

plugin help

Post by asettico »

In my company we use MANTIS for software change management and OTRS for ticket management.

I would like to create a Mantis plugin in order to manage OTRS connection (when a helpdesk ticket become a change request on software components).

To create a first simple version, I need:

- add a new field to a Mantis Bug (OTRS ticket number / ID)
- show this field as a HTTP link in Bug view, so cliccking on it I will access to OTRS ticket


I'm unable to understand if I can create and manage additional/custom fields from plugin and how to change the bug view/edit forms from the plugin.

Can some body help me with examples or documents ?

thanks in advance

Simone
istvanb
Posts: 226
Joined: 22 Aug 2010, 21:00

Re: plugin help

Post by istvanb »

I can help you in setting up the custom field:

1, Log in as an Admin
2, click to the Manage menu
3, click to the Manage custom fields
4, Enter a name for the custom field (eg.: "Ticket number")
5, Click the new custom field button
6, Now your custom field is created and you can configure it (take care of the options). In your case most likely the type should be "string".
7, Click to the manage project menu
8, click on a project where you want to use the field
9, in the project config page scroll down (approx. middle of the screen) where the "Custome Fields" is
10, select your field and add to the project by clicking the button

Ok, so now the new field should appear in the issues filed against that specific project and the users - based on the custom field settings - are able to assign a new value to this field.

If I understand your issue correctly a user can type a ticket number here and you want this to be an http link. If your user adds the ticket link as an http link then it will work fine under mantis. If the user types only the ticket number, then you probably need to write a custom php processing function which creates the proper http link from the ticket number. I have never done anything like this, so I can not help in this, but maybe some of the users can.

I hope it helps!
i-
asettico
Posts: 3
Joined: 17 Sep 2010, 15:08

Re: plugin help

Post by asettico »

My design is to make the plugin able to create customfields by itself.
Then it have to transform the ticketID in a HTTP Link.

Is this possible ?
istvanb
Posts: 226
Joined: 22 Aug 2010, 21:00

Re: plugin help

Post by istvanb »

I am not sure what the plugin should work, but as far as I understand you definitely have to go kinda deep into the mantis functions + the mantis database structure to develop your own plugin code for that! You can find some docs about the plugin devlopment on the mantisbt page.

Good luck, and publish your code when you are done!
Post Reply