Round Robin custom function doesn't work

Round Robin custom function doesn't work

Hi,
We have custom function for RR which has stopped working. 
Can you verify what happened to this code or in our system that it's not working anymore, please! 


leadIdStr=input.leadId.toString();

leadDetails = zoho.crm.getRecordById("Leads",input.leadId);

firstRefRecordDetails = zoho.crm.getRecordById("Leads",2375204000000425001);

firstOwner=ifnull(firstRefRecordDetails.get("SMOWNERID"),"");

if(firstOwner  ==  "2375204000000314001")

{

                UpOwmer="2375204000000251057";

}

if(firstOwner  =  "2375204000000251057")

{

                UpOwmer="2375204000000170001";

}

if(firstOwner  =  "2375204000000170001")

{

                UpOwmer="2375204000000313001";

}

if(firstOwner  =  "2375204000000313001")

{

                UpOwmer="2375204000000274001";

}

if(firstOwner  =  "2375204000000274001")

{

                UpOwmer="2375204000000272001";

}

if(firstOwner  =  "2375204000000272001")

{

                UpOwmer="2375204000000314001";

}

updatefirstRef = zoho.crm.updateRecord("Leads","2375204000000425001",{ "SMOWNERID" : UpOwmer });

info updatefirstRef;

mp=map();

mp.put("SMOWNERID",UpOwmer);

updateResp = zoho.crm.updateRecord("Leads",leadIdStr,mp);

info mp;

info updateResp;