Hackdayz #18: Absence Hub

Reading Time: 5 minutes

The best way is the easiest!

You want to plan the next projects, but do not know which of your employees are available? Who is on vacation ๐Ÿ–? Who is ill ๐Ÿค’? Who is where?

Or you are planning your next vacation and you are swiping about the best hotel offers and places. But then a mail from your boss: Your request is rejected ๐Ÿ‘Ž. The reason is that there is even a more important project and your talent is needed there!

These were our problems

We use for that two tools currently: Absence.io for planning your vacations and other absences and ResourceGuru for scheduling the resources for each project and customer.

Both tools are the best for its use case. But why so complicated? Why so many tools? Questions, questions and more questions,…

  • Can we make the absence requests easier for both sides?
  • Can we create the entries in one tool for the others at the same time?
  • In short – Can we optimize the process?

Our answer: YES, we can!

stay focused, be yourself and just do it

Boris Karov (Senior Software Engineer)

Our winning team

But how could we win?

First, we should have a look at our current approval process.

It’s complicated, isn’t it ๐Ÿคฆโ€โ™‚๏ธ? You have to log in, then your boss – in our case Fatih – has to log in in both tools and has to manage the requests. We had a discussion about the tools, which we might use, and finally came up with the answer: Absence.io sends us every morning the absences of each team member via SLACK. ๐Ÿ˜

A new idea was born

How can we use this Slack bot engine? Or can we create a new one?

We decided to create a new Slack bot for all out-of-office requests, to connect both tools and to make the approval process easier and faster.

After we achieved this milestone, we started with the project. For research and development, we shared the following tasks among each other:

  • Boris mainly took care of ResourceGuru
  • Stefan mainly took care of Absence.io and CI/CD pipeline
  • and I of the Slack bot communication and node service

but there MUST exist an API for that!

Stefan Maurer (Co-Founder & VP Engineering)

Let the game begin

We developed the first lines of code and sent the first API calls via Slack. Also, we figured out how to create slash-commands in the Slack bot UI and how to connect the commands to the service endpoints.

A slash-command for sending an absence request

Then we created more useful and prettier messages to make the approvement decisions comfortable.

The bot message to the approver

Both back-end guys had some troubles to learn how to write a nodeJS service (e.g. promises, …). And I had also issues in understanding the Slack SDK, but we mastered the brainfucks and achieved a lot in two short days:

  • CI/CD with Gitlab Pipelines
  • SlackBot deployment on Heroku
  • User Slack command
  • Absence is created in Absence.io
  • Approver can accept / reject in Slack

And we won ๐Ÿ˜‰

The happy winning team

Further steps

We still needed some other features for going live, too:

  • Let Dev choose who the approver is
  • Create TimeOff in ResourceGuru
  • Add caching via mongoDB to keep users IDs
  • Add handling to manage different user API keys
  • Add i18n date formats 2018/12/14, 14.12.2018,โ€ฆ
  • Support more formats like:
/remote 14.12.2018 morning
/illness 14.12.2018 afternoon to 15.12.2018 morning

Technology Stack

stay the way you are and get better and better every single day for the rest of your life

Stephan Ullenboom (Senior Frontend Engineer)

Conclusion

There were two very funny and productive Hackdayz. We had some challenges with API keys, because of both tools assigned there keys to a specific user and not to a project. Also, it required many, many, many API calls to find the users and resources etc. However, we made it ๐Ÿ™Œ.

We got to know each other better and went the extra mile together to win the trophy.

...and now, we have a new challenge: defend our trophy ๐Ÿ† at the next hackdayz ๐Ÿ˜.

2 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *