Add categories in Task by macro

Maciej_G 2 years ago updated by Jussi Rautio 2 years ago 1

Hi all,

Can you help me with macro that adding a categories to tasks without deleting existing categories?

I have something like this but it doesn't work

#foreach($Task in $utils.unwrap(${list}))
#set($unwrappedTask = $utils.unwrap($Task))
        #set($unwrappedTask = $utils.unwrap($Task))$unwrappedTask.setCategories("test_category")

You cannot just create and add a category as a String, as Category is a separate Class.