DEV Community

Cover image for Create ways for limiting WIP
Daniel Horowitz
Daniel Horowitz

Posted on

Create ways for limiting WIP

What is WIP limit and why it's important

WIP limits (work-in-process limits) are fixed constraints, typically implemented on Kanban boards, that help teams actively eliminate waste from their processes. WIP limits enable teams to optimize their workflows for value delivery

Okay but why is it so important?

Get stuff done 💪

WIP limits enforces the team to focus on a smaller set of tasks which improves the throughput and reduces the frustration of having things "nearly done". The result a feeling of getting things done faster

Avoid context switching 🤷‍♂️

According to Gloria Mark, Professor of Informatics at the UC – Irvine, "people compensate for interruptions by working faster, but this comes at a price: experiencing more stress, higher frustration, time pressure and effort."

How to automate it 🤖

In this article, we will automate the WIP limiting using Jira REST API. However the approach and key ideas can be replicated for any project software tracking which contains a REST API

Jira is your friend 😇

With the following, you can see all Jira issues assigned to you which are In Progress

assignee = currentUser() AND status = "In Progress" order by created DESC
Enter fullscreen mode Exit fullscreen mode

Using Jira REST API it would look like this

Enter fullscreen mode Exit fullscreen mode

Using the query above you can easily create reminders for you team to keep the WIP limited

Slack reminders

From slack's reminder documentation we can create a reminder using the following command:

/remind [@someone or #channel] [what] [when]

In our case, we want to to use the Jira query as the what here.

So for a daily personal WIP limit reminder we would have something like this

/remind me to 👋 Limit my WIP at 10am Every weekday
Enter fullscreen mode Exit fullscreen mode

Pro-tip: Add a link to "Limit my WIP" using CMD + Shift + U and set the Jira URL from the query we've created above

Git hooks

If you're not using slack or prefer not to leave the terminal for getting these reminders, you can use git hooks. In our case, we will use post-checkout.

The reason behind the decision of using this hook is that normally when starting a new task, at some point the developer will create a new branch using git checkout -b <branch> the hook will be triggered right after this command

Using the Jira query above we are able to create the following post-checkout git hook

Here we are using 2 env vars

  • JIRA_API_TOKEN Api token to authenticate in Jira. More info here
  • WIP_LIMIT env var to set wip limit

Also this piece of code is using jq to retrieve JSON fields


Top comments (0)