Advanced Live Board Configuration
In this article we are going to deal with two examples of configuration of advanced live boards.
EXAMPLE 1
In this example we are going to replicate the configuration of the data collection of the previous board but using the scripting area present in the board.
To create a live board you will need to go to the menu: Board -> List
Here you will need to click on the “+” button:
At this point, the board creation screen will appear.
Here we are going to select as board type “Live” and as Model Alias “Deep service Operation”.
Similarly to the freeform boards also in live Boards it will be possible to insert an icon, to do so it will be sufficient to click on the button
Next we click the apply button to save the changes
Now we have to go to the scripting area, like the one shown in the figure:
In the scripting area that will open we are going to insert the following code:
/* Only select tickets in New and Work in progress statuses**/
$this->getModelCollection() ->addFieldToFilters('status',["in"=>[1,2]]);
At this point we must go to click the save button to confirm the configuration.
EXAMPLE 2
In this example We are going to configure a live board that will load all the tickets for which the company of the requesting user has a flag set for priority assistance.
For this example we will assume that there is a “cust_prioritary_assistance” field in the company, of the checkbox type.
When the checkbox is flexed we will consider the company as a company with priority assistance.
To create a live board you will need to go to the menu: Board -> List
Here you will need to click on the “+” button:
At this point, the board creation screen will appear.
Here we are going to select as board type “Live” and as Model Alias “Deep service Operation”.
Similarly to the freeform boards also in live boards it will be possible to insert an icon, to do so it will be sufficient to click on the button
At this point we can go to add in the scripting section of the board the following code:
$this->getModelCollection()->getSelect()->joinLeft('deep_company_company','main_table.requester_company_id = deep_company_company.entity_id',[]);
$this->getModelCollection()->addFieldToFilter('deep_company_company.cust_prioritary_assistance', 1);
Now we must click on the Save button to save the board.