Ticket Tracker - The data model
![]() on June 17, 2009 In this tutorial, I'll show you the data model of the ticket tracker inside the one-click-start portofino package. This can be useful to understand better that example application. A ticket tracker is an application to keep track of reported bugs or issues related to a project. Users can enter tickets directly, and these are managed and assigned to developers, testers, etc., who wiil work on them. To better follow the model, I suggest that you download the one-click-start portofino, extract the files and launch your_dir/one-click-start-portofino-2.0.16/apache-tomcat-6.0.18/bin/startup.sh (or .bat if you use Windows). Your ticket tracker wiil start at http://127.0.0.1:8080/tt (use admin/admin to log in).
The class diagram
The following picture shows the class diagram of the ticket tracker. |
| ATTRIBUTE | TYPE | RELATED TABLE | NOTE |
| code | TEXT | the ticket code |
|
| project | RELATIONSHIP | project | the associated project |
| type | RELATIONSHIP | ticket type | the ticket type |
| description | TEXT | a brief description of the issue |
|
| priority | RELATIONSHIP | priority | the priority (low, medium, high) |
| resolution | RELATIONSHIP | resolution | the resolution |
| state | WORKFLOW | one of the worflow states |
|
| creation date | DATE | the creation date |
|
| update date | DATE | the last update date |
|
| summary | TEXT | A brief summary |
|
| assigned to | RELATIONSHIP | User | The user that has to fix it |
| reported by | RELATIONSHIP | User | The user who inserted the issue |
| expiry date | DATE | the expiry date |
|
| approver | RELATIONSHIP | User | The user that has to declare the resolution |
| close date | DATE | The date when the issue is closed |
Priority
| ATTRIBUTE | TYPE | RELATED TABLE | NOTE |
| name | TEXT | e.g. 'high', 'normal', 'low' |
Project
| ATTRIBUTE | TYPE | RELATED TABLE | NOTE |
| name | TEXT | the project's name |
|
| url | TEXT | the website url |
|
| description | TEXT | a brief description |
|
| code | TEXT | a short code |
|
| leader | RELATIONSHIP | User | the project leader |
Version
| ATTRIBUTE | TYPE | RELATED TABLE | NOTE |
| name | TEXT | The version name |
|
| description | TEXT | a brief description |
|
| planned date | DATE | the planned date |
|
| actual date | DATE | the actual date |
|
| project | RELATIONSHIP | project | the related project |
Ticket type
| ATTRIBUTE | TYPE | RELATED TABLE | NOTE |
| name | TEXT | 'Improvement', 'maintenance', 'new feature', 'problem' |
|
| description | TEXT | a brief description |
Resolution
| ATTRIBUTE | TYPE | RELATED TABLE | NOTE |
| name | TEXT | a short name |
|
| description | TEXT | a brief description |
User
| ATTRIBUTE | TYPE | RELATED TABLE | NOTE |
| login | TEXT | user's login |
|
| password | TEXT | user's password |
|
| TEXT | user's email |
UserGrp
| ATTRIBUTE | TYPE | RELATED TABLE | NOTE |
| name | TEXT | The group name (e.g. 'Users', 'User admins')
|
User_UserGrp (as a relationship)
| ATTRIBUTE
| TYPE | RELATED TABLE | NOTE |
| user | RELATIONSHIP | User | user reference |
| user group | RELATIONSHIP | UserGrp | group reference |
State Diagram
The following picture shows a state diagram of the workflow associated to a ticket (workflow attribute 'state' in class 'Ticket').Briefly a ticket is 'open' when an user reported it. The ticket is then associated to a user, who'll work on it and change its state to 'work in progress'. When the ticket is resolved, it change is state to 'Resolved', if the approver is satisfed by the "resolution" it can close the ticket or alternatively it can bring it in the "Work in progress" state.
| State |
| open |
| work in progress |
| resolved |
| closed |
| Transition | from state | to state |
| start work | open | work in progress |
| resolve ticket | open | resolved |
| close ticket | open | closed |
| reopen ticket | work in progress | open |
| resolve ticket | work in progress | resolved |
| start rework | resolved | work in progress |
| close ticket | resolved | closed |
| reopen ticket | resolved | open |
| reopen ticket | closed | open |


