On the Visual Task Board when you set a label (like red for defect) is there any way to have that label change a field value?

momarz1
Kilo Contributor

Hi All, 

On the Visual Task Board when you set a label (like red for defect) is there any way to have that label change a field value on the form? 

for example if you move a red defect label onto a card in the Visual Task board could we write a script to have that defect label update a boolean defect field on the form so that in the list view we can also show a red dot if that defect field is set to true. 


5 REPLIES 5

momarz1
Kilo Contributor

I figured this out on my own (love when that happens!) 

But in case anyone ever needs this, the VTB Labels live on the vtb_card table and are called Label 1, Label 2, etc.

You can add an after insert/update business rule on the vtb_card table. Set the filter condition to Label (whatever label you want to use...Label 1 for example) changes. Then add a script to query the table that your tasks are originating from and match the vtb_card task # with id number of the task you want to update. Then update whatever field you want.

find_real_file.pngfind_real_file.png 

Jimte
Mega Contributor

Hi Momarz,

Very helpful thanks for sharing. Do have some question as I don't completely understand how your script works.

At least... are below assumptions correct?

-"tsp3_project_task" is a custom table and tasks of this table are displayed in your vtb

-by gr.addQuery("number", current.getDisplayValue("task")); you query the task number of said tsp3_project_task table

-label 1 has a true/false box in the project task record that's called u_triage

BR

 

 

 

momarz1
Kilo Contributor
Yes all your assumptions are correct

Jimte
Mega Contributor

Thanks for the fast reply. In that case I guess I do know how the script works 🙂