Creative ways of limiting WIP

Daniel Horowitz
2 min readNov 7, 2020
Photo by rawpixel.com from Pexels

What is WIP limit

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 your team to focus on a smaller set of tasks which improves the throughput and reduces the frustration of having things “nearly done”. The result is 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 tracking software

Jira is your friend 😇

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

assignee = currentUser() AND status = "In Progress" order by created DESC

Using Jira REST API it would look like this

https://your-jira.atlassian.net/rest/api/3/search?jql=assignee%20%3D%20currentUser()%20AND%20status%20%3D%20"In%20Progress"%20order%20by%20created%20DESC

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

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

That’s it! If you know more ways of limiting WIP please share in the comments. Thanks for stopping by 👋

References

https://www.ics.uci.edu/~gmark/chi08-mark.pdf

https://www.atlassian.com/agile/kanban/wip-limits

https://www.planview.com/resources/articles/wip-limits/

--

--