Added the ability to embed JS-scripts in the board. How we do our project management system

    On the first of April, the YouGile system turned one year old. A serious deadline for the project, which began with the thought - “And let's make a convenient project management system for ourselves on the weekend.” Now several thousand users, mainly switching from BaseCamp and Trello, are all open for testing and sending us feedback.

    We regard this as a major experiment, there is no commercialization, and already on a sufficiently large user base we are looking for functions that can make managing any projects fundamentally more convenient.

    In general, the latest feature is that now, knowing a little JavaScript, you can completely modify the base version of the system for yourself.

    It works simply - the keyboard shortcut Ctrl + ~ calls the built-in JavaScript editor.



    You can write or upload any scripts on JS and they will change the work of individual boards or projects in the company. A library has been allocated - about 200 objects and methods that allow you to change system parameters, execute your code on various events in the system, and conveniently create your own interface elements or modify existing ones.
    The article discusses examples and asks the question of the need for such a function in project management systems.

    There are no restrictions on the possibilities of customization:

    • From a standard board you can get a well-sharpened support department system where tickets fall, are automatically distributed among managers, and the average response speed for the last 100 cards is displayed at the top. This is how it works for us now.

    • It is very easy to write bots. For example, someone who writes twice as many messages as the average on a team may receive "Are you not writing too much today, comrade?" tasks today.

    • You can make a board with any statistics and reporting. For themselves, they brought out a board with a list of all changes by tasks and a board with actual tasks for each person. You can also build any graphs, for example, the dependence of the number of closed tasks on the activity in chats. In large companies, this example is no longer absurd.

    Each of these examples is implemented in 20 minutes.


    A few stories about why you decided to make such a function


    When developing a project management system, there is one powerful feature. There are an incredible amount of Wishlist from users and they practically do not intersect with each other. It turns out huge boards with different requests and a million development paths looms. It comes to understanding that everything on the market today - BaceCamp, Jira, YouTrack, Asana and especially Trello, satisfy companies only at a basic level. Popular universal solutions never meet the request of teams of more than 20 people.

    The market is incredibly vibrant. Anyone who participated in at least some projects and worked with some systems has something to say. The average statement looks like this:

    “BaseCamp / Jira / YouTrack / Asana do not fit well, this and that cannot be done there, but there is nothing better. We are used to andwe use 5 different systems in different departments and change something every six months ”

    In large offices, to tears in general - to the question:“ Why don’t you use Asana? ”, the answer is:“ Yes, it has recently been implemented in our company and most likely will not take root. ”

    At first, we decided to modify the system for one fairly large team of 50 people, whose Wishlist were very logical and simple. But after improvements, as always unexpectedly, new wishes appeared. And these new ones were already very different, flew from all departments. The team simply broke through on ideas how to modify the system for their process.

    That's about how the understanding was born that the biggest need in the market of project management systems is customization. We need a simple basic version, which, like the others, satisfies well in the first approximation, but everything that can only be thought up should be easily finalized.

    How to use


    Manual.pdf

    Everything is quite simple, but you will have to be at least a little programmer. If the level of rights in the company is “admin”, then a button (or a combination of Ctrl + ~) will be available to call the code editor. Here you can write or upload your scripts.

    There is a library with selected methods and objects. The full list is located in the "API navigator" block on the right. Any object can be pulled with the mouse into the editor - then an example of code that works with this object will be inserted.



    Example No. 1. Bot glider


    Notifies the glider at 9:55 and selects a random moderator.

    1. Choose a chat (task) in which a message with a reminder will fall. The system has a special tab “Object Navigator”. Here it is easy to find the id of any element of the system (user, task, column, board, project, company). This way access to work with elements is realized.

      var task = Items.get('ca1307c2-9b83-4796-897c-7c071dc2fa94');
    

    2. Create a function that makes a random selection from the list of participants and places a message in the previously selected chat.

    function notifyOfPlanning() {
      var users = Users.listAll();
      // случайный юзер
      var chosen = users[Math.floor(Math.random() * users.length)]; 
      // сообщение от лица cистемы (пустой отправитель)
      Chat.postMessage(task, '', `Планёрка, ведущий — (${chosen.name})`);
      // сохраняем время последнего уведомления
      task.setData({lastRun: App.time()});
    }
    

    3. Create a function that checks the need to post a message.

    function check() {
      if (new Date().getDay() > 5) { // если выходной, то не уведомляем
        return;
      }
      var last = task.getData().lastRun;
      if (!last) {
        notifyOfPlanning(); // первый раз уведомит сразу
      } else {
        var now = App.time(); // серверное время (unix timestamp UTC)
        var dayStart = now - now % (24 * 3600 * 1000);
        var planningTime = dayStart +
          6 * 3600 * 1000 + 55 * 60 * 1000; // 6:55 по Гринвичу (или 9:55 MSK)
        if (last < planningTime && now > planningTime) {
          notifyOfPlanning();
        }
      }
    }
    // проверяем необходимость нотифицировать раз в 30 сек
    setInterval(check, 30000);
    

    Full script code with comments
    /**
     * Бот, который уведомляет о планёрке в 9:55
     * и выбирает случайного ведущего.
     */
    // задача, в которую будут попадать сообщения с напоминанием
    var task = Items.get('ca1307c2-9b83-4796-897c-7c071dc2fa94');
    function notifyOfPlanning() {
      var users = Users.listAll();
      var chosen = users[Math.floor(Math.random() * users.length)]; // случайный юзер
      // сообщение от лица системы (пустой отправитель)
      Chat.postMessage(task, '', `Планёрка, ведущий — (${chosen.name})`);
      // сохраняем время последнего уведомления
      task.setData({lastRun: App.time()});
    }
    function check() {
      if (new Date().getDay() > 5) { // если выходной, то не уведомляем
        return;
      }
      var last = task.getData().lastRun;
      if (!last) {
        notifyOfPlanning(); // первый раз уведомит сразу
      } else {
        var now = App.time(); // серверное время (unix timestamp UTC)
        var dayStart = now - now % (24 * 3600 * 1000);
        var planningTime = dayStart +
          6 * 3600 * 1000 + 55 * 60 * 1000; // 6:55 по Гринвичу (или 9:55 MSK)
        if (last < planningTime && now > planningTime) {
          notifyOfPlanning();
        }
      }
    }
    // проверяем необходимость нотифицировать раз в 30 сек
    setInterval(check, 30000);
    


    More examples can be found directly in the editor. We posted 4 working scripts with detailed comments:

    • Customize your background on each board.
    • Tape of all actions and events in the company.
    • Displays the response time to chat messages.
    • Running JS directly in the chat. It can be used as a calculator.

    Problem


    It is clear that the very idea of ​​easily customizable solutions for project management is in demand, but is our option accessible to at least some mass users? The requirement to be able to write a little code is very high. Although, probably, already in any company more than 30 people should be such a person.

    PS The function has no name. We don’t want to call the API, much has already been reserved for this in consciousness and this is not quite what we did. If you have any ideas, let me know.

    Also popular now: