📜 ⬆️ ⬇️

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

On April 1, the YouGile system is one year old. A short term for a project that began with the thought - “And at the weekend, let's make a convenient project management system for ourselves”. Now several thousand users, mostly moving with BaseCamp and Trello, everything is open for testing and sending us feedback.

We treat this as a major experiment, there is no commercialization, and already on a fairly large user base we are looking for functions that can make the management of any projects more convenient in principle.

In general, a fresh feature is that now, knowing a little JavaScript, you can completely modify the basic version of the system.
')
It works simply - the keyboard shortcut Ctrl + ~ invokes 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. The library is allocated - about 200 objects and methods that allow you to change system parameters, execute your code for various events in the system and conveniently create your own interface elements or modify existing ones.
The article discusses examples and asks about the need for such a function in project management systems.

There are no restrictions on customization options:


Each of these examples is implemented in 20 minutes.


Some stories about why they decided to do this.


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

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

“BaseCamp / Jira / YouTrack / Asana fit poorly, this and this is impossible there, but there is nothing better. We are used to and use 5 different systems in different departments and change something every six months ”

In large offices in general, to tears - the question: "Why do not use Asana?"

At first we decided to modify the system for one fairly large team of 50 people, the wishes of which were very logical and simple. But after the modifications, as always unexpectedly, new wishes appeared. And these new ones were already very different, flew in from all departments. The team just burst out on ideas how to refine the system for their process.

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

How to use


Manual.pdf

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

There is a library with dedicated 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 a sample of the code that works with this object will be inserted.



Example number 1. Bot planning


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

1. Select a chat (task) in which the message with a reminder will fall. The system has a special tab "Navigator on objects." It is easy to find out the id of any element of the system (user, task, column, board, project, company). Thus, 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:


Problem


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

PS The function has no names. We don’t want to call the API, in consciousness it’s already reserved a lot and this is not exactly what we did. If you have ideas, let me know.

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


All Articles