📜 ⬆️ ⬇️

Bot as a task manager?

I offer the readers of "Habrakhabr" a story about how I was looking for a convenient task manager to work among a variety of ready-made solutions and finally settled on a samopisny one.


It will be interesting to read if you:



The solution is distributed under the GNU GPL license, the link to the repository will be at the end of the article.


Programmatic ordeals


Since that time, when I, as the head of the department, I was actively looking for a convenient and understandable task manager for my team, about two years have passed. I tried a lot of things, I don’t remember everything. We used free solutions with minimal functionality, and paid products with the ability to refine and expand functionality, and well-known online platforms, so loved by many. The problem is always the same - tasks are discussed and formed in the messenger, and put in the browser. It always seemed to me not convenient, because in the course of a long discussion of a new functional and “debriefing” with a team, often there is simply no time to register all the pop-up tasks in a third-party solution, and it’s not convenient to look for them in the messenger history.


I also noticed one interesting thing - I never use the task manager for more than 10-20% of its capabilities. I do not use decomposition, Gantt chart, priorities and the end date of the task. As a rule, all these functions gradually become unclaimed and our team uses only two of them - setting the task and marking it for searching.


Fortunately, we never worked with tasks under tight deadlines, it’s all about the task manager’s functionality that came down to a todo list with several additional functions.


Task-bot


Long thinking about the functionality of the ideal, in my opinion, task-manager, I sketched myself a simple TK and decided to implement what was invented as a bot for Telegram. The bot's idea is simple - the bot should register the tasks, marking them with tags for searching, and after the task is executed, the bot should mark it as completed. For ease of use, the bot was equipped with two important functions: commenting on a previously created task and notifying that a task has changed.


The solution was written by me for several nights in my free time from work. PHP was used as a language, since this is my main (at the moment) PL, as well as several open packages and Doctrine 2. The bot does not yet use the webhook to receive messages from users, but works on simple poling. This solution was chosen by me in order not to complicate the implementation at the initial stage, because the future of the project is still uncertain. The solution itself is available on GitHub, but at the time of the beta test I prepared a working demo stand, which you can use to familiarize yourself with the bot.


Opportunities


The bot's functionality is divided into two categories: working with tags and working with tasks. Tags are used to search for tasks by keywords, and tasks accumulate all other data.


Work with tags


By tag, bot understands any word, smiley or username of the user (with leading @), with which tasks are marked. A task can be marked with any number of tags, which, in the future, it will be easy to find. For ease of use, the bot uses the "current tags" mechanism. With its help, any user determines the list of tags at the beginning of a session using a bot, which will be applied to all created tasks.


Consider an example of working with tags. Suppose you decide to create several tasks for your team involved in the Zeus project. Between you and the bot will be the following dialogue:


: /ms  backend :  : /t   :  : /t      :  : /ts : 1 -   2 -    

All tasks you create will be labeled with your current labels (zeus and backend), which you specified using the /ms command.


Current labels are individual for each user. This allows you to work with the bot development team and not interfere with each other. To get a list of your current labels, use the /ms command (without arguments), and to get a list of all labels, use the /ms * command.


Work with tasks


The task includes the following data:



Consider an example of working with tasks. Suppose your team has started to perform the tasks set earlier:


 : /ts : 1 -   2 -    : /t 1 : : 12.07.2017 :  backend   : /t 1 c   :  : /t 2 t     :  : /d 2 :  

As you can see from the examples, the /t command allows you not only to create tasks, but also to view and edit them. When editing a task, in addition to the target task identifier, a flag defining the editable field is used. The following flags are available:



To complete the task, use the /d command. Completed tasks are automatically marked with a "virtual" tag "completed", which allows you to access them in the future, for example:


 : /ts   backend : 2 -     

Similarly to the "virtual" tags refers to "today." This tag marks all tasks created or completed in the last 24 hours.


As I said earlier, a bot can notify participants of a change in a task. Changes are understood as:



Work with users


Very often, when assigning tasks to project participants, it is necessary to immediately indicate those responsible and sign them for alerts on these tasks. The special label @username used for this (username is replaced with the name of the target user). If a user with the same name is in the bot database (he has interacted with him ever), he will be automatically subscribed to alerts.


Example:


 : /ms  backend @developer @manager :  : /t   :  

It is as easy to see all the tasks for which specific users are involved, because regular tags are used:


 : /ms  @developer :  : /ts : 3 -   

Afterword


Frankly, I have not had a chance to test the bot on a real project. Hope to do it after the holidays. If you are interested in this solution, here are some links:



')

Source: https://habr.com/ru/post/305462/


All Articles