Calculation of worked days and fix of one more feature of Bitrix24 from Avivi

22 September 2022

next article
Slava Nahnybida

PR manager

Slava Nahnybida
Calculation of worked days and fix of one more feature of Bitrix24 from Avivi

How many days have you been working at your current job? If you think about this question, you can quickly find only an approximate answer: more than five years, a year and two months, or a few weeks. For an accurate answer, you will need the help of a calendar. One of our clients set a goal to clearly know when an employee completes exactly 90 days of stay in the company and when the next year comes up together with the team to congratulate the person and express words of gratitude to him. It seems like a fairly simple task that can be done on your own without the involvement of developers. But literally immediately it became clear that it is impossible to do this without customization. Fortunately, our clients use on-premise Bitrix24, where nothing is impossible for Avivi developers.

Obstacles for the administrator

Therefore, our clients independently tried to use a simple logical method: create an additional custom field in the employee's profile and, based on the information in it, configure the system for counting days. You can create such a field for the administrator in 1 click:

  • Open the employee`s profile;

  • Select the “Create field” command;

  • Create a new field with the appropriate type of data offered by the system;

  • Save the changes and make the custom field available to all employees.

scrnli_22-09-2022_11-33-40 (1).png

However, after successfully executing this algorithm, it became clear that something had gone wrong. The new field simply didn't appear after reloading the page: neither for the admin nor for the rest of the staff. The field was also missing in the "Select field" command. Therefore, all further hopes of setting up Bitrix24 disappeared and customers applied to Avivi.

Even after a superficial analysis, it became clear that we are dealing with another feature of this software. Our specialists found the field created by the administrator in the dashboard  of the self-hosted Bitrix24 without any problems — the record about it was in the list of custom fields "Userlist", but the field itself did not appear in the profile of the employees. We additionally tried to reproduce this error in other on-premise editions of Bitrix24 and got the same result everywhere. That is why the solution of the task from the customer required customization.

How does the calculation of worked days work?

The beginning of the project was the creation of a copy of the standard Bitrix24 component "intranet.structure.birthday.nearest", which is responsible for the familiar notification of employees' birthdays in the right part of the Portal. After our specialists customized it, and parallel work with the original component does not affect the system's serviceability in any way. To correctly calculate a specific number of days, it would not be correct to rely solely on the calendar: one month has 30 days, another has 31, 28 or 29. That is why we created a function that counts the actual number of days: like the client wishes, it is exactly 90. But here the annual term is strictly tied to the date in the calendar from which the person is officially hired.

It is this date that should be put in the custom field. Our developers also fixed the feature of on-premise Bitrix24 specifically for this case — the created field is normally displayed in the user Profile. The administrator has the extra opportunity to view and edit employee records from the dashboard, if one of them, for example, forgot to specify the date of employment.

Exactly 90 days after employment, the system sends a notification to all users that their colleague has successfully worked for the specified period. A similar message appears in "Feed". Anniversary notifications with the company are also displayed on the right side of the Portal, just like birthday notifications, but colored differently to distinguish them.

Bitrix24 allows its owners to expand the functionality of the system almost limitlessly and create exactly the solutions that the customer needs. Avivi's professional team is able to customize anything and find the best option to fulfill the wishes of its customers. So if you need a tool that is not provided by the system — contact us and improve your business for the maximum benefit and comfort of your employees.

Get more with Avivi!

Similar articles
Apply for a consultation

We will reach out to within 10 minutes