Creation and Advanced Configuration of a Lane and Drop Code
A Lane in Deepser is the entity within the boards that serves to contain and organize in a logical way the entities loaded by the board.
In this article we will see an example of advanced lane configuration using the scripting area on the lane and an advanced example of changing the Drop Code of a lane.
EXAMPLE 1
In this example we are going to show in the lane only the tickets in The New state, by default id 1.
To Edit a live lane you will need to go to the board where you want to change the wool, here you will have to click on the three dots:
At this point we will have to go to the scripting area “Data Collection (Script)” as in the figure shown here:
Here we are going to enter the following code:
/**Visualizing only the ticket in with state "NEW"**/
$this->getModelCollection()->addFieldToFilter('status',["eq"=>1]);
At this point click on the “Apply” button:
Now the lane will be updated automatically by the system loading only the tickets that correspond to the filters set
Customize the Drop Code
The drop code in Live boards is the code that is executed when a ticket is dragged onto the board.
To customize the drop code of a Lane in a live board you will need to go to the Lane to customize and click the 3 points.
In the current example, let’s say we want to set the company as a company with priority assistance when a ticket is dragged into this Lane.
To do this we insert in the scripting area “Drop Code (Script)”:
the following code:
/**Setting prioritary assistance for the company of the dropped ticket **/
$company = $this->getDroppedModel()->getRequesterCompany();
$company->setData('cust_prioritary_assistance',1)->save();
At this point click on the “Apply” button:
At this point when a ticket is dragged on this board its status will change again.