Our website uses cookies to enhance your browsing experience.
Accept
to the top
close form

Fill out the form in 2 simple steps below:

Your contact information:

Step 1
Congratulations! This is your promo code!

Desired license type:

Step 2
Team license
Enterprise license
** By clicking this button you agree to our Privacy Policy statement
close form
Request our prices
New License
License Renewal
--Select currency--
USD
EUR
* By clicking this button you agree to our Privacy Policy statement

close form
Free PVS‑Studio license for Microsoft MVP specialists
* By clicking this button you agree to our Privacy Policy statement

close form
To get the licence for your open-source project, please fill out this form
* By clicking this button you agree to our Privacy Policy statement

close form
I am interested to try it on the platforms:
* By clicking this button you agree to our Privacy Policy statement

close form
check circle
Message submitted.

Your message has been sent. We will email you at


If you haven't received our response, please do the following:
check your Spam/Junk folder and click the "Not Spam" button for our message.
This way, you won't miss messages from our team in the future.

>
>
PVS-Studio team's kanban board. Part 2:…

PVS-Studio team's kanban board. Part 2: YouTrack

Aug 12 2021

Hello everyone! Welcome to the second part of the PVS-Studio Team's Kanban Board story. This time we'll talk about YouTrack. You'll learn why we chose and implemented this task tracker and what challenges we encountered. We don't want to advertise or criticize YouTrack. Nevertheless, our team thinks JetBrains has done (and keeps doing) a great job.

0853_Kanban_YouTrack/image1.png

I discussed how we integrated kanban, and why we decided to switch from Bitbucket to a new task tracker in the previous article, "PVS-Studio Team's Kanban Board. Part 1: Agile". Do take a look if you haven't already – this will help you understand the concepts I discuss further on. Note that since YouTrack offers multiple features, I won't be able to cover them in detail. To see all the features, check out the documentation. This article is for those who want to use or already use the tracker.

Background

If you don't want to read the previous article, then here's a brief background story. After implementing the kanban method, we realized how useful a kanban board is for daily meetings. However, after we all switched to remote work, we could not use our usual physical board anymore. We struggled a bit and then decided to speed up the process of choosing an alternative task tracker to replace Bitbucket. We wanted a tool with an agile board. In fact, we were choosing between YouTrack and something else. Our C++ team lead (hey there, Phillip) encouraged us to use YouTrack. The main competitor of YouTrack was Jira. Eventually, we picked YouTrack.

The PVS-Studio team had been using Bitbucket since mid-2014. Bitbucket suited us well for a long time. But as the company was growing, we needed more complex features, not available in Bitbucket. Some functionalities were too difficult to implement:

  • advanced notification settings;
  • customizable workflows;
  • task dependencies;
  • time tracking;
  • reports;
  • agile boards.

Even after a cursory study of YouTrack, we realized that it offers these features out of the box. Inspired by YouTrack, we started switching to the new tool.

Getting ready

As I've mentioned in the previous article, overall our team created 5500 tasks in Bitbucket. Obviously, we wanted to export the existing tasks to YouTrack, but it was quite difficult to do.

On the other hand, it's fairly easy to export tasks from Bitbucket to Jira. Alternatively, you can export data with Bitbucket API into an intermediate json file of a certain format. We tried to save the entire repository to a zip archive via the Bitbucket export menu. Unfortunately, after some time the process froze in any browser. Forum website visitors link this long-standing issue to the new Bitbucket API version. Thus, the only possible option is to upload tasks one by one to the same json file with the help of a script (you can find several similar scripts on the Internet). But that's only half the story. On the other hand, YouTrack lets you import tasks from Jira and from some other systems. But there's no Bitbucket among them. The only option is to import the data through json. To do this, you need to prepare the data source: convert the Bitbucket's json file, while taking into account all the differences in data formats.

Exporting previous tasks to YouTrack turned out to be a complicated task. Eventually, we gave up this idea. We decided to manually export a number of tasks from Bitbucket to YouTrack: about a hundred of those that we had not started yet (backlog) and a couple dozen tasks that were on hold. As for Bitbucket, we kept it as an archive. Only five employees have access to Bitbucket, and we use its free version now.

Then we created our first project in YouTrack. We chose YouTrack InCloud because it has a quick setup. Previously, we've already had a YouTrack test repository, so we understood this system pretty well. Besides, YouTrack offers many learning tools, for example, interface tips and a test project with a detailed description of all features the tracker offers.

The diversity of YouTrack features took some getting used to. The workflow management also differed from Bitbucket's. Bitbucket has few custom settings compared to YouTrack. In YouTrack, you can customize notifications, saved searches, reports, agile boards and "Knowledge Base" articles.

I'd like to point out that we didn't have any serious technical difficulties or unsolvable issues when switching to YouTrack. Eventually, everything we needed, we made happen. Moreover, we discovered many additional features when we started using YouTrack daily – or started to appreciate them, to be precise. For example, spent time reports allow you to see employees who created or closed a task and also those involved in the task. I'll tell you more about YouTrack time tracking a bit later.

As a side effect, we had to optimize our business processes. We implemented new workflow approaches we hadn't thought about before.

YouTrack presented us with a technical challenge to configure workflows that are written in JavaScript. But mostly we dealt with administrative challenges. Here's what we had to do:

  • choose employees to switch to YouTrack first, decide whether to switch the entire team at once or start with one department;
  • choose architecture: one project for everyone or different projects for the development and marketing teams, for example;
  • create users, configure roles and groups;
  • set up the project and define access permissions;
  • configure fields structures;
  • create and configure kanban boards;
  • choose a time tracking strategy;
  • configure workflows;
  • set up reports;
  • train employees how to use YouTrack.

In this article, I'll review each of the challenges listed above.

Switching order, creating projects

We had one main question. Which team should migrate to YouTrack first? We were afraid to switch everyone at once. In this case, we would have had to configure YouTrack and refine it to accommodate our processes, while a large number of users were using the system. We decided to start with the marketing team. Firstly, they've already been using kanban on a daily basis, the same as our developers. Secondly, our marketing team consists of 10 employees. This was enough to try out all the main scenarios of using the new tracker. Finally, we just didn't feel sorry for them. Our marketing team is very creative and very flexible in terms of innovations. I'd like to thank the head of our marketing team, Ekaterina, for her endless patience and support while we were integrating YouTrack. :)

Another question was whether to create one project for the entire company or different projects for different teams. YouTrack offers convenient tools for managing several projects at the same time. At first, we wanted to separate the development team from the marketing team. We could create several projects and thus reduce the total amount of values in the fields, the number of tags, etc. Moreover, it would simplify the tracker usage for users. But there was a very important argument against it: our tasks are constantly reassigned between marketing and development employees. For example, a task to write an article. Let's say, a C++ developer writes an article. Then the marketing team employees get the article to proofread and translate. The author gets the article back to post online. Finally, after the author publishes the article, the marketing team receives the task again to promote the article on social media and forum websites. Thus, two projects would complicate our interaction and familiar workflow. YouTrack can move tasks between projects, but fields of different projects must match. Also, some workflows linked to a certain project may depend on its fields.

So, we decided to create one shared project, add all teams there, and set up the project so that they can work together simultaneously. The marketing team was the first to switch. On December 3, 2020, we created the "Marketing" project and later renamed it to "PVS-Studio".

0853_Kanban_YouTrack/image2.png

Users, groups, roles

Managing users, groups, and access rights (roles) in YouTrack is simple but has some peculiarities. I'll talk about them in more detail further on. Let's start with the hierarchy.

YouTrack InCloud is a service that JetBrains offers for its team products. All JetBrains services are joined together. The top-level service, JetBrains Hub, allows you to control other services and exchange data. JetBrains Hub also stores general settings, such as access rights, users, groups. They are called resources.

The "Global" project is the parent project for all projects. By default, YouTrack suggests adding all created groups as resources to the project. So, you can use all created groups in all subsidiary projects. You can make a group invisible by adding it to a specific project.

0853_Kanban_YouTrack/image4.png

By default, the "All Users" parent group represents all users. Also, there's the "Registered Users" subgroup with an auto-join option for registered users. You can use YouTrack user groups to configure user access, in task selection requests, and in workflows.

Since we decided to use a shared project, we did not need to configure user access via groups. However, we added several groups that show the company's structure.

0853_Kanban_YouTrack/image5.png

We use these groups mainly when sending workflow notifications. An employee and a team lead receive a notification, for example, about an overdue task. It was easy to implement. The "Managers" group includes all team leads. Each team group contains employees, and one or more team leads. When notifying a user, we check their group. If they are in the "Managers" group, only the manager receives the notification. Otherwise, we search for the user's workgroup. The user and all team leads from the working group receive the notification. I'll tell you more about our workflows later.

Let's go back to the group list. Note that all groups (resources) belong to the "Global" project. The "Registered Users" group has the "Global Observer" role. A role in YouTrack is a named set that contains permissions of two types: "Hub" and "YouTrack". The "Hub" type permissions provide access to work with global entities: groups, projects, roles, users, etc. The "YouTrack" type is used to configure access to tracker features. The "YouTrack" type allows to work with tasks (create, comment, add attachments, etc.), reports, saved lists, etc. We did not create additional roles. The default entities proved sufficient.

0853_Kanban_YouTrack/image7.png

Each new user is automatically added to the "Registered Users" group. In accordance with the "Global Observer" role, a new user receives a minimum set of three permissions.

0853_Kanban_YouTrack/image9.png

These are the "Hub"-level permissions. We wanted to automate the process of adding new users as much as possible so that they immediately get the necessary set of permissions to work in the "PVS-Studio" project (the "YouTrack" levels of access). I'll show you how we implemented it. Let's open the properties of the "Registered Users" group.

0853_Kanban_YouTrack/image10.png

Besides the "Observer" role, the group also has the "Developer" role in the "PVS-Studio" project. By default, YouTrack sets the "Developer" role to work in the project. We have explicitly assigned this role to the "All Users" parent group, so the role is inherited from this group.

0853_Kanban_YouTrack/image12.png

So that was pretty easy. Now that we've discussed group settings, let's take a look at the project settings to fully understand YouTrack permissions.

The project has a "Team" concept. A "Team" here is a group of users who can work with the project. Members have specified roles. Our project has the following settings.

0853_Kanban_YouTrack/image14.png

Nothing surprising. There's the same "All Users" group and the "Developer" role. We can configure the team members' access (the "Edit" link) by selecting one or more roles.

0853_Kanban_YouTrack/image15.png

Finally, you can use the "Access" tab in the project settings to see users with access.

0853_Kanban_YouTrack/image16.png

Here you can see users' access permissions, directly assigned roles, and global project permissions.

You can configure roles further. Since we had one "Developer" role for all project users, that was the only role we customized. We slightly changed the "Hub"-level permissions. Namely: we added the "Read Group" option. This option allows users to specify groups in issue filters. Note that if you change default settings, YouTrack displays the "changed" mark to the right of the checkbox.

0853_Kanban_YouTrack/image18.png

In addition, we customized the "YouTrack"-level permissions for the "Developer" role. We gave access to edit teammates' articles in the project's "Knowledge Base" and delete/update comments to articles. We disabled the "Delete Issue" option. Only the administrator can delete tasks. We also disabled private field visibility. An example of such a field is our spent time tracker (date and time). It stores the amount of time spent on a certain task.

0853_Kanban_YouTrack/image19.png

Finally, a few words about users. It's quite easy to create users and give permissions. You need to request the required number of licenses in the tracker's global settings, create users, set emails and temporary passwords. By the way, YouTrack does not count blocked users' licenses. Thus, we managed to create the entire company structure at the beginning of the migration. We unblocked only marketing team users, so, we didn't need to request additional licenses until all other users were ready to migrate.

Now let's talk about the key component of any tracker – task fields.

Fields and tags

Initially, we wanted to create the same field structure in YouTrack as we had in Bitbucket, and then customize the structure according to our needs. But we faced a few difficulties. Our physical kanban board was an add-on for Bitbucket. Therefore, many things our physical board provided (additional task states, card colors) were not available in Bitbucket.

YouTrack's online agile board, on the other hand, is based on entities that you configure in the tracker. We wanted to use the board right away. So, at first, we had to establish the familiar field structure and then customize it taking into account how the online board displays the fields. In other words, we had to combine Bitbucket fields and the entities of our physical board.

I'll skip the details of how we matched the fields and chose a suitable configuration. It took us some time, but finally we did set a field selection that met all our requirements. Also, I'd like to point out that for some workflows, YouTrack needs additionally configured (service) fields.

Now I'll talk about our current fields in YouTrack. They are listed below.

0853_Kanban_YouTrack/image20.png

Project. The list does not include such a field. However, the card of any task has the project field and the project's name to which the task is attached. We have one project – "PVS-Studio".

Assignee. Used to assign the task performer, the current assignee. Before you can assign a task to a user, you need to explicitly add this user to the "user" type enumeration. The field values are used for naming swimlanes on the online kanban board (display tasks by assignee).

State. Used to show the current state of a task. May have the following values:

  • Buffer — contains scheduled tasks. No one worked on these tasks. If no assignee is specified for a task in Buffer, the task is considered as backlog;
  • In progress — a task in progress;
  • Review — a task is under review;
  • On hold — a team member is working on a task, but the task is temporarily (for a short period) postponed;
  • Resolved — a task is solved and closed (the expected result is achieved);
  • Suspend — a team member had been working on a task but postponed it for a long period of time (with the intention to return to the task);
  • Wontfix — a task is not solved, it is closed (could not be solved for some reason, was added by mistake, etc.);
  • Duplicate — a task is not solved, it is closed, because there is a duplicate task.

YouTrack uses field values to name swimlanes on an online kanban board (tasks are displayed by assignee).

Component. Specifies the department or sub-department. For example, "Marketing", "Office", "C++ (Rules)", "C# (Core)", etc.

Type. Contains a type of a task: a random task (Task), a task to fix a bug (Bug), a task to prepare an event or a report (Event), a task to write an article (Article), etc.

Priority. Defines a task's importance, priority. Priority can have the following values: Minor, Normal, Major, Critical, Blocker.

Scope. "Scope" — time (in hours, days, or weeks), which we plan to spend on a task. A team member fills out the field when creating a task. If the task takes much more time than we planned to spend, we discuss the reasons. The system adds the work item automatically when the task is "In progress" or on "Review" (the "State" field). To use this feature, you need to enable time tracking and configure the appropriate workflow in project settings.

Spent time. Adds up the amount of time (in total) that was spent to complete the task. Spent time is the second field that you have to configure when enabling time tracking in project settings. The field is read-only. The amount of spent time (a work item) can be added in two ways:

  • manually using the "Add spent time" comment;
  • automatically (YouTrack automatically adds the spent time and displays this as the special comment). YouTrack logs time automatically when a task's "State" field is set to the following values: "In Progress" or "Review". When you stop working on a task (put it "On hold" or in "Resolved"), this time is added to the value in the "Spent time" field. Besides, the time is added when you change assignees. YouTrack also updates the amount of time spent on each task automatically at 9:00 am every workday. YouTrack records the last change (date and time) in the "TimerTime" field. You can customize all these features in the corresponding workflow, which I will describe later.

Time tracking in YouTrack is very useful. You can see how much time each user spent working on the task and how much time the task took overall. As I mentioned earlier, you can use this information in special reports to get a complete picture of each employee's contribution to the work.

If the TimerTime value exceeds the "Scope" value, a special progress indicator circle turns red (the indicator is shown in the task card and the task list). If the amount of spent time does not exceed the Scope time, the progress indicator shows a pie chart with the amount of time spent and the amount of time left.

0853_Kanban_YouTrack/image22.png

TimerTime. The TimerTime field is hidden from users. The field stores the date and time of one of the last changes: a task state, an assignee. TimerTime helps you to track the amount of time spent.

Due Date. This field allows you to set the date and time when a task must be resolved (the Resolved state). A reporter sets the due date. If a task is overdue and is not resolved by the due date, the assignee (and their higher-ups) receive daily notifications by email. The field helps to configure notifications.

Enumeration type (state or enum) fields offer an additional setting. You can choose colors for values that these fields show. Task lists and boards display the colors. Here's an example of the "State" field:

0853_Kanban_YouTrack/image23.png

Besides the fields' configuration, YouTrack offers to customize special task labels, called tags. You can create tasks without tags and tasks with multiple tags. Tags are very useful. You may use many different combinations of task states. Note that you also can set multiple values to the enum type fields, but combining fields and tags seems to be more efficient. We currently use almost 18 tags.

Here's the head of a task card with tags.

0853_Kanban_YouTrack/image24.png

Also, note the color of the enumerated fields in the legend of the same task.

0853_Kanban_YouTrack/image25.png

Fields and tags indicate that Phillip is the assignee, and the task is on hold. The task has the C++ component ("New Rule" and "Client" tags mean that the assignee is working on a new diagnostic at the client's request. The diagnostic belongs to the "General Analysis" class). This is the task with the Major priority. The task's reporter estimated the scope at four workdays (32 hours with an eight-hour working day). Note that the team has already been working on this task for 16 workdays. That gives us food for thought. :) The task has no "TimerTime". This means, YouTrack does not record time for this task (because "State" is set to "On hold"). The task has no deadline.

Take a look at the task list.

0853_Kanban_YouTrack/image26.png

By the way, we filtered the tasks by the C++ component (for all sub-departments). To do this, we used the following query:

Component: {C++ *}

The request gets all tasks whose values begin with "C++". YouTrack search queries is one of the most powerful features. Besides, search queries are user-friendly. You can save tags and search queries, configure notifications, share queries with colleagues, or use queries privately. I'll talk a little more about queries when we get to workflows.

You can use all fields and tags of a task in search queries and in reports.

Kanban

I've told so much about online boards, so, I can't help but show at least one. :) Here is a screenshot of our C++ kanban board (tasks are filtered by assignee).

0853_Kanban_YouTrack/image28.png

The "Resolved" column is collapsed. YouTrack filters cards to match a query. You can set a query in board settings:

0853_Kanban_YouTrack/image30.png

Thus, you see all unresolved tasks and tasks resolved after March 11, 2021 (this is the date of one of the latest releases). We decided to filter the resolved tasks by one release cycle to free the space on the board.

Also, we filtered the tasks list by explicitly specified users to display them on the board swimlane. Of course, YouTrack has other options to display swimlanes. Recently, we changed the swimlanes display. Now we have boards with a summary for each team. It allows us to focus more on tasks and their positions on the board. You can customize the board.

Now, let's talk about one more important feature of YouTrack boards. Initially, we used the "Automatically add new issues" mode to configure our kanban. YouTrack offers the mode by default. As the "Manually assign issues" mode, the "Automatically add new issues" mode adds a task to the board. The task and the board are linked. So, the task literally belongs to the board. But you can't, for example, filter tasks by date in the "Resolved" column, as we have now. The board displays all the tasks that we've ever added. This is one of the reasons why we chose to filter cards to match a query instead of the first and the second options. Moreover, when you create a task in the "Automatically add new issues" mode, a new task appears on all the boards at once. It may be inconvenient. Although, the "Automatically add new issues" mode may be useful to work with multiple time-limited projects on one board. This option requires fewer additional settings.

It's easy to configure the rest of board settings, so that's all here. Kanban is an out-of-the-box feature in YouTrack. You can use kanban right away. As for time tracking and workflows, you have to configure these features. Now, it's time for most interesting part.

Time tracking and workflows

A kanban board was not the only thing we lacked in Bitbucket. We also wanted to have time tracking and workflow features. I'll tell about these features in one section, because without workflows, you can't use automatic time tracking. You can use time tracking only in manual mode.

See the YouTrack workflows documentation for more details. In a nutshell, you can write workflows in JavaScript. These scripts automate various types of tracker features. YouTrack provides a set of default workflows. So far, this set contains over 35 workflows. You can customize default workflows. You can easily roll back default workflows. You can create workflows for your own use and shared workflows (to share workflows from different scripts). So, YouTrack provides space for creativity.

We used several default workflows that seemed necessary to us. We modified some workflows and added a couple of new workflows.

Time tracking

We wanted to implement time tracking long ago. We needed to estimate the amount of time spent on a task and find out why some tasks are time-consuming. We wanted to analyze our workflows. In Bitbucket we tried to set scopes in square brackets in task headers. By the way, tasks headers included some other information that we could not set in the Bitbucket fields. For example, we added the [client] word in square brackets. It meant that a team member was working on a task at a client's request. Here's an example of such a task: "[client][5 days] The task summary". It is clear that Bitbucket could not analyze these so-called tags that we created. Therefore, we developed a utility that used the API to get information from Bitbucket and generate various reports. Also, this utility helped us to notify team members about forgotten tasks (tasks without comments posted over the last three or four days, for example). That's how we tried to customize our workflows in Bitbucket.

As for time tracking in Bitbucket, we could analyze tasks only manually. We had to look at the creation date of the task, look for a scope value (that was not always present) in the description, and draw conclusions. Such a complex workflow! We were so happy when we learned about time tracking in YouTrack. We customized time tracking almost in three clicks. We just enabled the time tracking option in the project settings by adding a couple of fields.

0853_Kanban_YouTrack/image31.png

Right after, we could manually add so-called work items and get special reports. I've mentioned reports in the Fields and Tags section. By the way, you can customize work items by adding your custom types of work. This way, you can see what each assignee did within a task during a particular period of time.

After enabling time tracking, you can leave it at that. However, in this case, the users are responsible for logging the time spent on a task. As working on a task for some time, employees must update the task card with a work item and the time. But employees often forget to update the task, or they are too lazy to do that. That's why YouTrack offers automatic time logging. For time management, YouTrack provides two ready-to-use workflows with different approaches:

  • In Progress Work Timer. This workflow tracks the task state and adjusts time tracking parameters (starts and stops the timer);
  • Stopwatch-style Work Timer. This workflow allows you to start and stop the timer manually. Stopwatch-style Work Timer adds the "Start" and "Stop" values to the field.

The second workflow is similar to the manual mode. But even such a semi-automatic workflow is much better than the manual one. The user still has to start the process, but they don't have to estimate the spent time. The script tracks the time.

We chose In Progress Work Timer. It logs work items automatically but requires much more effort to configure. I'll talk about this workflow – and other ones – in the next paragraph.

Workflows

You can access project workflows in project properties. Here is our current set of workflows.

0853_Kanban_YouTrack/image33.png

You can find the full set of workflows in the global settings. Each workflow can include several rules (modules). Each workflow has a clear title. Moreover, each workflow and its rules have a unique name. For example, "assignee-state". You can see the rules if you expand the workflow node.

0853_Kanban_YouTrack/image34.png

For rules, the name corresponds to the js script file. For example, "check-assignee-state". The "@jetbrains/youtrack-workflow-" prefix in workflow names indicates default (pre-configured) YouTrack workflows.

YouTrack has five types of rules:

  • On-change: is applied when a task is changed;
  • On-schedule: is applied to tasks according to a schedule ;
  • State-machine: regulates transitions from one value to another for custom fields;
  • Action: is used when a user selects an action (a custom interface command);
  • Custom: is applied to objects and functions from other workflow modules.

Let's move on and discuss our workflows.

Assignee and State

We created this workflow. It contains a single rule of the "On-change" type:

  • Block users from setting an invalid assignee.

The rule tracks changes in the "State" and "Assignee" fields and prevents a wrong combination of values. For example, a task is unassigned. But someone tries to take the task or resolve it immediately. In this case, the script displays an error. So, the changes are not applied. YouTrack has the default "Issue Property Combinations" workflow with similar options. However, we created our own workflow because it is more convenient. And because, why not? Besides, YouTrack uses default names for its customizable fields. We changed many field names to more suitable ones. The default field names would have complicated the modification of default workflows.

Assignee Visibility

This is a default (pre-configured) workflow. The workflow has one "On-change" rule:

  • Warn when issue is not visible to assignee.

The rule makes sure assignees are members of the visibility group. The rule is useful for teams that run several projects and control access through groups of users. If someone forgets to add a user to a group, the user won't be able to create a task. The rule checks the visibility before you assign a task to a team member. We are not interested in this rule since we have one project. All the users have access to the project by default. Nevertheless, this rule is auto-attached. So, we use it to be on the safe side.

Common

This is a custom workflow which has three modules:

  • common-datetime (the "Custom" type);
  • common-users (the "Custom" type);
  • DEBUG ACTION (the "Action" type).

I gave you the names of the first two modules instead of clear titles. These modules contain blocks of code that we can use in other rules. So, these modules don't have clear titles. The third module is meant for debugging. So, you don't have to (although it is possible) give it a clear title. That's why I titled the module DEBUG ACTION. The module's name is "common-debug-action".

The "common-datetime" module contains time-tracking logic. The module gives the business calendar for the current year. It also stores our function that calculates minutes between two dates (includes only workdays). I'll tell you more about the "common-datetime" module in the "In Progress Work Timer" section.

The "common-users" module contains code that automatically notifies users about important changes. For example, you receive a notification if a task is overdue. You also receive a notification if your task has no comments for the last three days. We decided to notify assignees and their higher-ups to increase productivity. I've already mentioned this process in the "Users, groups, roles" section.

Now let's talk about the "DEBUG ACTION" module. You can guess its purpose. We created the "DEBUG ACTION" module for debugging. This is an "Action" type rule. Such rules allow you to create quick actions for tasks in YouTrack. To see the list of available actions, click the toolbar item with three dots.

0853_Kanban_YouTrack/image35.png

You can also select an action in the Apply Command window:

0853_Kanban_YouTrack/image36.png

When you select an action, a block of code is executed immediately. You can customize the visibility of such rules (menu items). For example, the window displays the "DEBUG ACTION" only for a specified user (me). You can configure which actions are displayed in certain scenarios, for example, when users create new tasks, etc.

What's this module for? We had some difficulties while debugging workflow scripts in YouTrack InCloud. In fact, debugging happens after the workflow is executed. The workflow editor analyzes the output data. Such debugging seems to be enough. But we wanted to run custom code (modules) directly in the cloud. I created DEBUG ACTION to solve this issue. Perhaps I could implement some other smart and technically correct options to process custom code. However, my approach was good enough too.

Dependencies

This workflow is a default workflow that includes a single "On-change" rule:

  • Block users from resolving issues with unresolved dependencies.

The rule controls linked tasks, namely tasks with the "Depend" relationship (depends on - is required for). This dependency means that one task depends on another. You cannot close a task while the other task is in progress. We often link tasks, so this rule is useful.

YouTrack has one peculiarity. You can link tasks using a built-in (or customized) set of dependency types for tasks. But these dependencies are not available without the appropriate workflows. So, be careful when deactivating default YouTrack workflows. The same is with custom fields' names. YouTrack workflows have default sets of fields. If you change some values, be ready to edit your workflows.

Check out the documentation for more information about links (dependencies).

Due Date

This workflow is also default. Due Date helps you set deadlines for tasks. This workflow contains two rules by default. However, we decided to use only the second one:

  • Require due dates for submitted issues (we do not use it);
  • Notify assignee about overdue issues.

The first one is the "On-change" rule. It requires every reporter to set a "Due Date" when creating a task. We disabled this strict rule.

We found the second rule useful. The rule helps us to notify assignees and their higher-ups about overdue tasks. The rule is "On-schedule". It follows a schedule to process tasks (the "cron" parameter). To get a list of the tasks, it uses a search query (the "search" parameter). We slightly improved this rule. By default, the "On-schedule" rule checks the value in the Due Date field on workdays: from Monday till Friday. But sometimes we have public holidays on workdays. So, we added an additional condition that checks the Due Date field only on workdays and excludes the predefined public holidays. To do this, we used the verification functions from the "common-datetime" module. As I mentioned earlier, we also use the extended mailing feature from "common-users" module to notify users.

Duplicates

This workflow manages duplicate tasks. We rarely create duplicate tasks, but sometimes it happens. Therefore, we added this workflow to the project. The Duplicate workflow contains five "On-change" rules (we do not use one of the rules):

  • Attach duplicate links to single duplicated issue;
  • Raise priority when an issue is duplicated by another issue (we don't use it);
  • Reopen issue when all duplicates links are removed;
  • Set state to "Duplicate" when duplicates link is added to issue;
  • Require links to duplicate issue when state becomes "Duplicate".

YouTrack provides two ways to mark the task as Duplicate:

  • A user can set the "Duplicate" state to a duplicate task. In this case, YouTrack automatically links tasks (duplicates - is duplicated by).
  • or vice versa: if a user links tasks, YouTrack automatically sets the "Duplicate" state to the task which is duplicated.

Moreover, if you want to delete the link between duplicate tasks or to change the "Duplicate" state, you have to ensure the correct behavior. The workflow monitors all these features. We slightly modified the rules of this workflow. We just changed some names of task states (they differ from the default names).

In Progress Work Timer

Now let's talk about a default workflow, which was challenging to configure. As I said earlier, we wanted to try time tracking. So, we were glad to see this feature in the list of pre-installed features. However, the out-of-the-box implementation was not good enough for us.

The default process includes two "On-change" rules:

  • Start timer when issue is in progress;
  • Stop timer when issue is fixed.

The first rule tracks a task state. When an employee sets the task to "In Progress" (the task is in progress), the "TimerTime" field logs the current date and time. When the employee finishes the task (changes the "In Progress" state to any other), the script of the second rule automatically adds a work item. The rules record the time span between the current date and the value saved earlier in the "TimerTime" field. The algorithm seems simple, but it has some disadvantages:

  • the time is recorded only when a task is "In Progress". We have additional states which also require time tracking. We have the "Review" state, for example. We wrote our additional states into the scripts, it was easy to do;
  • the original version of the "Stop timer when issue is fixed" script specifies the current YouTrack user (ctx.CurrentUser) as a reporter (an assignee), while adding a work item. This does not work for us, because a team lead often closes tasks at the end. Then, the work item is recorded as performed by the one who resolved the task. It does not affect the total time spent on a task. But in this case, a time report is pointless. A handy Time Report allows you to see the contribution of each employee. Our script adds a work item for the assignee who creates the task. The "Assignee and State" workflow, described earlier, checks that a task has an assignee;
  • the change of assignee is ignored. Several assignees could work on a task, but a work item is added for a person who closes the task. To solve this issue, we added an additional module named "Restart timer when the assignee is changed". This simple rule tracks the change of assignees for tasks in progress. In this case, the script creates a work item for a previous assignee. The script adds the time that the assignee spent on the task. The timer restarts;
  • more of an improvement, rather than a solution to some issue. If an assignee works on a task for a long time (for example, several days), then we don't know the exact amount of spent time. Because the work item is added only when a state or an assignee changes. Only then we see the total spent time on a pie chart in the task list:
0853_Kanban_YouTrack/image37.png

Let's say an assignee forgets about the task "In Progress" and takes another task. Then they come back to the task and decide to resolve it. In such a situation, a great amount of time is added, during which no one worked on the task. In fact, that's not a big deal. Previously created work items are editable (you can manually change the value of the time added). But we want a fully automated process, don't we? :) Therefore, we added another "On-schedule" type rule named "Update timer on schedule". Every workday morning, this rule restarts the timer for tasks in progress. Hence, our tasks have a new work item every day. However, we can view the exact amount of time spent with an accuracy of one day;

  • when a work item is added, "Stop timer when issue is fixed" uses the default "intervalToWorkingMinutes" function from the "Project" class to track the difference in minutes between two dates. The function uses a minimal set of YouTrack settings for time tracking:
0853_Kanban_YouTrack/image38.png

The function tracks time only on workdays and the days specified as workdays. The function does not track the time of the lunch break and holidays. The function gives a rough report in minutes. Let's say your workday starts at 9:00 and ends at 18:00 (as we have it). You start the task on Tuesday at 5:45 p.m. The next morning, on Wednesday, you continue working on the task and resolve it at 9:15 a.m. The "intervalToWorkingMinutes" function displays eight and a half working hours (510 minutes). That is fine, since switching the task to the next day immediately gives us one working day (1*8*60 = 480 minutes). It also gives the additional time in minutes to get a full hour (15 + 15).

We wanted more accuracy, so we wrote our own version of the "intervalToWorkingMinutes" function, which satisfies our needs. For the above example, the function returns 30 minutes. Our function also excludes the weekend (Saturday or Sunday) and public holidays in our country. This function helps calculate the time between two dates, and send out notifications from other workflows(for example, about "Due Date"). The users receive notifications during working hours only. The "intervalToWorkingMinutes" function and our function are in the shared "common-datetime" module.

Thus, we modified the default "In Progress Work Timer" workflow and expanded it to four rules:

  • Start timer when issue is in progress;
  • Stop timer when issue is fixed (was renamed to "Stop timer when the issue is resolved or paused");
  • Update timer on schedule (was added);
  • Restart timer when the assignee is changed (was added).

You may think that we overdid it with time tracking, and this is partly true. But YouTrack encourages us to customize the workflows as much as possible, so we couldn't resist :)

Besides, we didn't customize everything at once. We still keep tweaking things from time to time. Now I'm going to tell you about one interesting error that we found after we started to use this workflow actively. I'm talking about a bug (or a feature) of the tracker. I am talking about the "Scope" field, which contains the scope of the task.

Initially, we set three working days as the default value for this field (3d). Some time later, we noticed a strange thing. Tasks with the three days value did not have a pie chart. Take a look at the screenshot:

0853_Kanban_YouTrack/image39.png

The second and the fifth tasks do not have pie charts. While working with YouTrack, we found out that we need to explicitly specify the value in the "Scope" field. At the same time, something happens under the hood of YouTrack, and then this value is correctly addressed. We had to disable the default value. Besides, the requirement to specify the scope is useful, as it encourages to estimate the amount of spent time at the beginning. Perhaps the YouTrack developers have already fixed the bug. I was too lazy to study this issue in detail.

Finally, I want to say a few words about the management side of time tracking. We hope that we've managed to create a convenient workflow mechanism. But that's not enough. We need to learn how to use the tool and develop the best workflow.

Here's a simple example: if you stop working on a task, don't forget to change its state (put it "On hold" to stop the timer) and vice versa. You have a clear picture of workflows if you change the state promptly. However, this self-evident approach has a downside. At the beginning, employees tried to hack the system. They put a task on hold, so the timer stopped. But in fact, they continued to do the task. Therefore, the team seemed to do nothing – there were only a few tasks in progress.

Also, many users thought that their higher-ups would use time tracking to track some secret KPIs to raise or low their salary, etc. Of course, we did not want to do that. We implemented this workflow mainly to increase the efficiency of task management and estimate more precisely possible labor costs.

Overdue work activities

This is an untypical process. It involves a single "On-change" rule:

  • Notify assignee on overdue work activities.

This module is very similar to the "Notify assignee about overdue issues" module from the "Due Date" workflow described above. This module helps us to regularly notify assignees and their higher-ups if there were no comments on a task for a certain period. We use the following search query:

State:{In progress},Review
  commented:-{minus 3d}..Today
  created:-{minus 1d}..Today

The query displays all tasks in progress except for tasks that received comments over last three days or were recently created (the day before). The workflow helps us to identify forgotten tasks and encourage employees to provide progress reports in the comments.

Subtasks

This is a default workflow. "Subtask" has a set of two "On-change" rules that automate subtasks:

  • Open parent task when subtask changes to an unresolved state;
  • Fix parent task when all subtasks are resolved (we do not use it).

To create a hierarchy of tasks, YouTrack uses a link of the "Subtask" type (subtask of - parent for). I talked about links in the "Dependencies" paragraph. Subtasks are very useful. We really lacked these features in Bitbucket. By the way, we noticed an interesting thing. In YouTrack, we have a larger number of tasks (on average for the company) that are in progress per unit of time, compared to Bitbucket. With a comparable number of employees. I think one of the reasons is the frequent use of subtasks in YouTrack. Subtasks allow us to decompose tasks more easily. Let's get back to the rules.

The first rule checks the state of all subtasks of an already closed parent task. If at least one of the tasks is taken back to work, the parent task is reopened.

The second rule automatically resolves the parent task when all its subtasks are resolved. We found the second rule inconvenient because we often use parent tasks as full-fledged tasks. They are not just for aggregating subtasks. An employee may still working on the task after all subtasks are resolved. Therefore, we disabled this rule.

However, we needed another rule. We wanted to prohibit users from closing the parent task if there is at least one subtask in progress. So, we expanded the default workflow. We added our own rule – "Block users from resolving issues with unresolved subtasks".

That's all I wanted to say about our workflows. The article seems to be a long read. But I wanted to show that YouTrack is user-friendly. You can easily customize your workflows. I guess our team succeeded.

Reports

YouTrack has time reports, a useful feature that we also wanted to implement. Time reports help to collect data and summarize statistics. For example, we often use the built-in time report that I mentioned earlier. We do not monitor the time each employee spent on a task. Time reports help us to estimate employee's contributions to team progress, implement effective time management strategies, and analyze our workflows.

However, we got used to reports in Bitbucket (we used our own report generator in Bitbucket) and did not want to give them up. Besides, in YouTrack you may use the API to access all tasks. Thus, every employee can customize and use any built-in YouTrack reports. In addition, our higher-ups receive a large summary report every month as we had in Bitbucket.

Employee training

Finally, I'll tell you how we trained our team to work with YouTrack. We used workflow tracking tools before, so our team did not have difficulties with the YouTrack interface. YouTrack has lots of features. A number of options may confuse you at first. But it's no big deal. The YouTrack team tries to simplify the interface. Recently, they added the "Light" mode, changed the menu structure, etc. I often hear people saying that YouTrack is too complex for users. It's partly true. But I still think that it's a matter of time and practice to get used to the tool.

However, it may be difficult to change workflows, field structures, task links, and add time tracking. Our task team gradually introduced these features. Then, employees had to understand everything promptly. Team members made an effort to learn about new features. Some employees didn't like that. We made two presentations to explain YouTrack features. So far, we continue to get questions and objections.

I also want to add an Easter egg here for our employees. One of the purposes of this article is to provide our team members with the additional information about YouTrack. A hard worker of PVS-Studio, if you're here and ready to answer extra questions about YouTrack, I've got a gift for you. :)

Conclusion

Looking back, I'm proud and satisfied with the work done. I think other employees who helped to implement the kanban and switch to YouTrack feel the same. We've completed an important stage in developing our company. Introducing YouTrack was difficult, but very exciting. We had to solve lots of management and technical issues. We held meetings and discussions, agreed on deadlines, defended our points of view, and wrote code in JavaScript.

I want to thank all involved and wish us to remain passionate about what we do. It's just the beginning. And that's great!



Comments (0)

Next comments next comments
close comment form