The project implements a simple issue tracker primarily for software projects stored in Subversion. I hope to use it only for myself. If readers of this resource are interested, I will try to refine the code to the possibility of more universal use and post the project on GitHub.
The use of Subversion (hereinafter referred to as SVN) for storing code is dictated by the fact that, in addition to the source texts of programs, SVN has a self-written set of scripts for archiving other documents.
The project was born out of the need to keep track of our own work. An analysis of analogues showed that the use of available free trackers requires the installation and configuration of additional software, such as: a full-fledged web server and database server; Python and some additional scripts. Since I need the tracker only for local control of my own work, such costs seemed unnecessary. In addition, this is a necessary programming practice for me.
For the implementation of the project, a client-server architecture based on QLocalSocket was chosen, because it is necessary to link two independently working components - SVN and the tracker itself.
The tracker must:
- run at system startup;
- have a server side and a visual interface.
The tracker client must be launched when the project changes are committed to SVN by the pre-commit hook. The tracker client must send the server the name of the project, the number of the issue to be closed, and the revision number. In turn, the server must accept this data and transfer the task to the "closed" state.
The data on closing the task is entered by the user in the comment to the commit in the following format:
<произвольный текст> #{номер закрываемой задачи} <произвольный текст>
The rest of the data is assigned by the client.
Tracker interface
The tracker interface should look like this.
On the left side is the Project Management group. It consists of the following elements:
- list of projects;
- buttons "New project", "Archive project", "Open archive".
On the right side is the "Task Management" group. It consists of the following elements:
- list of tasks;
- drop-down list "Status of the task", has three values: "inactive", "in progress", "closed";
- buttons "New task", "Edit task", "Delete task".
Project management
Selecting one of the projects with the mouse initiates the loading of the list of tasks for the corresponding project.
Clicking the New Project button opens the project creation dialog.
In the text input field, the user must enter the name of the project. Depending on the position of the radio switch “SKB” (Version Control System), the name to be entered may contain the following characters:
- "without version control system" - any characters;
- "under the version control system" - only Latin characters without spaces, including the underscore character.
A project without ACS in the list of projects is marked with the letter "M" in brackets (from English manual - manually) before the name of the project.
The "Archive project" button allows you to archive a project for which all tasks are closed. If not all tasks are closed for the project, the tracker issues a corresponding warning and interrupts archiving of the project. If all tasks for the project are closed and the "Archive project" button is pressed, then the project name is excluded from the list of projects in the main tracker interface after the user agrees with the corresponding warning.
The "Open archive" button allows you to open an archived project and load the task list associated with it.
By pressing the "OK" button, the marked projects should appear in the list of projects in the main tracker window. Previously archived projects are marked in the list of projects with the letter "A" in brackets in front of the project name.
Task management
If no task is selected, the Task Status drop-down list, the Edit Task and Delete Task buttons are disabled. If a task is highlighted, these items are available. In addition, the Task Status drop-down list is set to the value specified in the table. If a task in the closed state is selected, the Task Status drop-down list, the Edit Task and Delete Task buttons are also disabled.
Depending on the state of the task, the line in the task table is colored in the corresponding color:
- not active – white color (254, 254, 254);
- in work - yellow color (255, 254, 4);
- closed - green color (143, 210, 68).
Changing the value of the Task Status drop-down list changes the status of the task in the table and the color of the table row. When set to “closed”, confirmation is requested to close the task, since it will be impossible to change its status in the future. If all project tasks are closed, the tracker automatically offers to archive the project.
By pressing the "New task" button, a dialog box for entering / editing a task opens.
In the text input field, the user must enter a description of the task, select the type of task from the drop-down list. There are four types of tasks predefined:
- bug – error correction;
- feature – development of a new feature;
- issue – processing of an external request;
- milestone - planned release of a new version.
When a line is selected in the task table and the task status is "inactive" or "in progress", the "Edit task" and "Delete task" buttons are available.
Clicking the Edit Task button opens the task input/edit dialog shown above.
By clicking the "Delete task" button, the user must confirm the deletion of the task.
The date and revision are assigned automatically when the task is closed. In the case of closing the task manually (for both types of projects, with and without FQ), the “Revision” field is set to “manual”.
Tracker settings
At the first start, the tracker prompts the user to set the path to the project folder.
If the "Cancel" button is pressed, the user will be able to create only projects without hard currency.
By clicking the "..." button, a standard folder selection dialog box opens.
By pressing the button to close the window of the main interface, the tracker is minimized to tray.
A context menu is available from the tray with the following commands:
- "Open tracker";
- "Path to projects"
- "Exit".
The "Open tracker" command opens the main interface of the tracker.
The "Path to projects" command opens a dialog box for setting the path to projects. If:
- the path has not yet been configured (the "Cancel" button was pressed when the tracker was first launched), the user can use all the elements of the dialog box;
- the path is configured, all elements are blocked, except for the "OK" button; hovering the cursor over the input text field displays a tooltip with the full path to the project folder.
The "Exit" command closes the application completely.
Conclusion
- The main requirements for the project are described.
- Developed interface prototypes.
- Defined the main logic of the application.
Прикольно. Это такая локальная Jira получается?
А если добавить функционал по редактированию коммитов и веток, то получится базовая реализация TortoiseSVN. Только кроссплатформенная...
Редактирование веток и коммитов - чересчур. Это надо подключать API самого SVN. Я заглянул туда и понял, что пока рановато...
Да, похоже на Jira, только я её не рассматривал. Ориентировался на Mantiss, Bugzilla и Trac.
Ясно)) А можно ещё переписать на QML и используя Web Assembly показывать прямо в браузере. Тогда может быть многопользовательский вариант системы.