Page 1 of 1

Adding Reporter Contact No, Designation automatically

Posted: 23 Aug 2017, 10:24
by ashik
Hello,
I have added 3 columns like branch name, contact no, designation to the mantis_user_table & beside this I have created 3 custom fields to bug_report_page.php. When anybody will report any issue then branch name, contact no, designation fields will be filled up automatically from mantis_user_table, how can i do this??
Your cooperation will be highly appreciable.

Regards,
Ashik

Re: Adding Reporter Contact No, Designation automatically

Posted: 23 Aug 2017, 18:43
by atrol
ashik wrote:I have added 3 columns like branch name, contact no, designation to the mantis_user_table
You should never change any existing table of Mantis but create your own one.
ashik wrote:designation fields will be filled up automatically from mantis_user_table, how can i do this??
You can write a plugin for that https://www.mantisbt.org/docs/master/en ... ev.plugins

Re: Adding Reporter Contact No, Designation automatically

Posted: 24 Aug 2017, 05:43
by ashik
Dear Atrol,
Thanks for your quick response. I am giving you an explanation of my problem, my mantis_user_table is being updated automatically which conveys Active Directory user so for this reason I wanted to add some columns (branch name, contact no, designation) of the corresponding user to the same mantis_user_table & I wanted to display information as I want to the Custom Field of bug_report_page.php. Is it possible?

Re: Adding Reporter Contact No, Designation automatically

Posted: 24 Aug 2017, 06:24
by atrol
ashik wrote:for this reason I wanted to add some columns (branch name, contact no, designation) of the corresponding user to the same mantis_user_table
I understand, but still, as a well-intentioned advice: Do not change any of the standard Mantis table, but create your own one for it.
You might get problems at a later time when upgrading Mantis.
Of course, you can do whatever you want.
ashik wrote:Is it possible?
As I wrote, you could write a plugin (the clean but slower way) or change existing code of Mantis (the dirty but fasterway).

Re: Adding Reporter Contact No, Designation automatically

Posted: 24 Aug 2017, 06:55
by ashik
Dear Atrol,
Thank you for your suggestion. OK fine, I am not changing mantis_user_table. I have very basic knowledge of Programming so If I create new table as per my requirement where i can keep reporters' contact no, designation, branch name, how can I display that information to the Custom Field of bug_report_page.php of the corresponding Reporter.

Re: Adding Reporter Contact No, Designation automatically

Posted: 24 Aug 2017, 07:09
by atrol
Sorry @ashik, I don't have time to provide such kind of support.

There are a lot of plugins where you can learn from at https://github.com/mantisbt-plugins
I had a quick look and maybe at least some source parts of the following plugins could be useful for you
https://github.com/mantisbt-plugins/CustomReporter
https://github.com/mantisbt-plugins/lin ... tom-fields
https://github.com/mantisbt-plugins/customer-management