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

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

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

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?

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

1 Like

simple solution. change this line:

to:

            <?= $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.

2 Likes

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.

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…