Skip to main content

Configure Advanced Lanes and Drop Code

A lane in Deepser is the entity within boards that contains and organizes the entities loaded by the board. While the query builder covers most filtering needs, the scripting area provides full control over data collections and drop behavior. This article demonstrates advanced lane configuration using PHP scripting for both data filtering and drop code actions.

Filter a Lane with Scripting

In this example, the lane displays only Service Operations in the "New" state (default ID of 1).

To edit a live lane, go to the board where you want to change the lane, then click the three-dot menu:

Navigate to the scripting area "Data Collection (Script)" as shown in the figure:

Enter the following code:


/**Visualizing only the Service Operation with state "NEW"**/
$this->getModelCollection()->addFieldToFilter('status',["eq"=>1]);


Click the "Apply" button:

The lane will be updated automatically by the system, loading only the Service Operations that match the filters set.

Customize the Drop Code with Scripting

The drop code in live boards is the code that executes when a Service Operation is dragged onto the board.

To customize the drop code of a lane in a live board, navigate to the lane you want to customize and click the three-dot menu.

In the current example, suppose you want to set the company as having priority assistance when a Service Operation is dragged into this lane.

To do this, enter the following in the scripting area "Drop Code (Script)":


/**Setting prioritary assistance for the company of the dropped Service Operation **/
$company = $this->getDroppedModel()->getRequesterCompany();
$company->setData('cust_prioritary_assistance',1)->save();


Click the "Apply" button:

When a Service Operation is dragged onto this board, the company's priority assistance flag will be updated accordingly.