0

Add categories in Task by macro

Maciej_G 7 years ago updated by Jussi Rautio 7 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")
#end


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