Adding Reporter Contact No, Designation automatically

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
ashik
Posts: 3
Joined: 23 Aug 2017, 10:05

Adding Reporter Contact No, Designation automatically

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

Re: Adding Reporter Contact No, Designation automatically

Post 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
Please use Search before posting and read the Manual
ashik
Posts: 3
Joined: 23 Aug 2017, 10:05

Re: Adding Reporter Contact No, Designation automatically

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

Re: Adding Reporter Contact No, Designation automatically

Post 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).
Please use Search before posting and read the Manual
ashik
Posts: 3
Joined: 23 Aug 2017, 10:05

Re: Adding Reporter Contact No, Designation automatically

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

Re: Adding Reporter Contact No, Designation automatically

Post 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
Please use Search before posting and read the Manual
Post Reply