# Colums: Task limit 0 (really Zero!) / Change column color

**URL:** <https://kanboard.discourse.group/t/colums-task-limit-0-really-zero-change-column-color/312>\
**Category:** Open Discussions\
**Created:** [April 5, 2019, 8:32pm UTC](https://kanboard.discourse.group/t/colums-task-limit-0-really-zero-change-column-color/312 "2019-04-05T20:32:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![croessler](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/croessler/32/138_2.png) [@croessler](https://kanboard.discourse.group/u/croessler)\
**Post date:** [April 5, 2019, 8:32pm UTC](https://kanboard.discourse.group/t/colums-task-limit-0-really-zero-change-column-color/312/1 "2019-04-05T20:32:34Z")

</div>

Hey everyone,

at first: thanks for reading this!  
I did not find a similar question with the board search. Sorry if there actually was one.

I would like to have a “Problem” column. For this I would like the task limit to be actually 0 so any task being moved in that column makes it become red. As far as I see, the figure 0 in the task limit field actually makes the limit infinity.

Is there an easy solution for this, beside setting the limit to one and provide a dummy task?

Thanks in advance,  
Christian

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [April 5, 2019, 9:59pm UTC](https://kanboard.discourse.group/t/colums-task-limit-0-really-zero-change-column-color/312/2 "2019-04-05T21:59:37Z")

</div>

Use an automatic action in that column that changes the tasks to the color red…perhaps

---

<div class="post-metadata">

**Author:** ![croessler](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/croessler/32/138_2.png) [@croessler](https://kanboard.discourse.group/u/croessler)\
**Post date:** [April 8, 2019, 8:07am UTC](https://kanboard.discourse.group/t/colums-task-limit-0-really-zero-change-column-color/312/3 "2019-04-08T08:07:43Z")

</div>

Hadn’t thought in that direction, thanks.

Anyway, it does not seem to work. The most suitable action available should be “Assign a color when the task is moved to a specific column”, but that changes the color of the task, not the color of the column.  
Or have I missed something?

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [April 8, 2019, 11:08am UTC](https://kanboard.discourse.group/t/colums-task-limit-0-really-zero-change-column-color/312/4 "2019-04-08T11:08:49Z")

</div>

No, you didn’t miss anything. Sounded like you wanted the task to become red. You’d have to write your own action then.

I’ve never played with task limit though, maybe there ano there solution…I’ll take a look

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [April 8, 2019, 3:23pm UTC](https://kanboard.discourse.group/t/colums-task-limit-0-really-zero-change-column-color/312/5 "2019-04-08T15:23:08Z")

</div>

simple solution. change this line:

> <https://github.com/kanboard/kanboard/blob/8cee04101d351fb5321f225963d589883761d214/app/Template/board/table_tasks.php#L6>

to:

```php
            <?= $column['task_limit'] >= 1 && $column['column_nb_tasks'] >= $column['task_limit'] ? 'board-task-list-limit' : '' ?>

```

and set task limit to 1. Now the column will become red when 1 task in moved into it. You could just edit the code to achieve this, or use an override in a plugin, which would keep you from having to change the code everytime you upgrade kanboard. up to you.

If however you actually want “0” to be zero, then it won’t be simple anymore.

---

<div class="post-metadata">

**Author:** ![croessler](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/croessler/32/138_2.png) [@croessler](https://kanboard.discourse.group/u/croessler)\
**Post date:** [April 8, 2019, 7:51pm UTC](https://kanboard.discourse.group/t/colums-task-limit-0-really-zero-change-column-color/312/6 "2019-04-08T19:51:54Z")

</div>

Yes, that is it! Thank you so much!

I changed the code since I am not sure how to do the plugin-solution (I understand I would have to write one) and it works fine.

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [April 8, 2019, 10:03pm UTC](https://kanboard.discourse.group/t/colums-task-limit-0-really-zero-change-column-color/312/7 "2019-04-08T22:03:18Z")

</div>

Good stuff, if you decide to make it a plugin, I could explain it for you, it’d be very simple. Might even be easier for me to just do it for you rather than explain it, tbh…
