User Tools

  • Logged in as: anonymous (anonymous)
  • Log Out

Site Tools


mantisbt:users_directory

Mantis Users Directory

Author: Victor Boctor

Introduction

Recently, I've decided to add a users directory to Mantis Website. This directory lists some of the companies / projects that uses the Mantis Bug Tracker. At the moment, the process for an entry to be added is as follows:

  • An authorized person from the organization sends me an email.
  • I add the entries that I got about once a month.
  • I reply back confirming that the entry has been added, thank them for submitting it, and requesting a link back if possible.

The data that is currently captured is:

  • The email (in one of my email boxes) – not a very reliable repository. The email has the contact name, contact email address, and request for addition.
  • The company/project name.
  • The URL of the company.
  • The URL of the Mantis installation if public.

The problem with this process is that it is a manual process which ends up consuming from my time as well as causing a delay from the time the entry was submitted till the time it is added. This is in addition to potentially losing some entries.

How can this be automated?

Request Form

  • Contact Name
  • Contact Email Address
  • Company/Project Name
  • Website URL
  • Mantis URL
  • Comments
  • Captcha - Used to confirm that the form is not submitted by a bot.

Email to Confirm Contact Email Address

  • Send a confirmation email to the contact email. The contact email will need to click on a link to confirm his address.
  • Delete entries in the database that hasn't been confirmed for a week or longer.

Approval Request Email

  • Once the email is confirmed, then a request for approval is sent to the administrator. The request email will include all the information about the directory entry + an approve / reject hyper links.
  • If the administrator clicks approve, then the directory entry is added and a notification email is sent to the person who submitted the request.
  • If the administrator clicks reject, then no email is sent and the entry is discarded form the database.

Entry Added Email

  • This is the email that is sent to the person who submitted the request when the request is approved.

Users Directory Page

This page is similar to the users directory that we currently have. However, it is populated from the approved entries in the database, rather than from entries that are hard-coded in the PHP file. Following are some guidelines:

  • Entries are group by the first letter of the company name.
  • Empty groups must not be displayed (e.g. if no companies start with Z, then don't display it).
  • Within each group, entries are sorted alphabetically by the company name.
  • High profile entries are to be displayed in bold or have an icon next to them.
  • The total number of entries should be shown at the end of the page.

Contact Us Page

Although this is not directly related to the users directory, it is very similar and hence it is included as part of the scope. The idea is to add a form from which website visitors can send emails to the administrator. The form should have the following fields:

  • Contact Name
  • Contact Email
  • Subject
  • Body
  • Captcha

Once the form is submitted an email is sent from the mantis email account on behalf of the email specified by the user. The Mantis administrator can then reply to this email and the reply will go directly to the email reported in the form.

Database Schema

The database used will be a MySQL database. The schema should look as follows:

mantis_user_directory_entry table

  • entry_id - primary key - auto-increment
  • hash - an auto-generate hash that is used when approving / rejecting the entry. The entry_id is not used since it is a predictable sequential number.
  • date_submitted - timestamp
  • company_name - 50 varchar
  • contact_name - 50 varchar
  • contact_email - 255 varchar
  • website_url - 255 varchar
  • mantis_url - 255 varchar
  • comments - text
  • status - int(1) - (0 - submitted, 1 - confirmed, 2 - approved).
  • high_profile - int (1) - (0 - no, 1 - yes) - examples of high profile mantis users are Airbus, Volvo, Zend, etc. – This will be set manually in the database, default 0.

Technical Requirements

  • Support MySQL 4.x/5.x database
  • Support PHP 4.x/5.x
  • Use PHPMailer for sending emails. There should be a configuration entry that can be used to specify the path where phpmailer is installed on the webserver.
  • Have a single configuration file (no changes to source files to modify configs).
  • Follow Mantis coding guidelines (http://www.mantisbugtracker.com/guidelines.php).
  • It must be very easy to change the users directory page layout or the content of the emails.
mantisbt/users_directory.txt · Last modified: 2011/11/16 07:41 by atrol

Driven by DokuWiki