Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding a variable to the workflow expression engine
#6
OK, I dug around a little. When I log the $user variable in this line (https://github.com/tsolucio/corebos/blob/master/modules/com_vtiger_workflow/VTEntityCache.inc#L16), I get the current user object as expected. But when I log the $data variable at the end of that __construct function, I get an array with the entity returned with the wrong assigned_user_id. My user ID is 6, but I get:

PHP Code:
[account_id] => 3x504
    
[invoicestatus] => Sent
    
[assigned_user_id] => 19x14
    
[createdtime] => 2013-01-03 08:48:48
    
[modifiedtime] => 2018-07-13 15:35:26 

I get 14 back.

And just for the heck of it I logged:

PHP Code:
    public function __construct($user$id$deleted false$queue false) {
        global 
$log;

        
$this->moduleName null;
        
$this->id $id;
        
$this->user $user;
        
$this->isDeleted=$deleted;
                
$this->isqueue=$queue;
        if (
$deleted) {
            
$data vtws_retrieve_deleted($id$user);
        } else {
            
$data vtws_retrieve($id$user);
            
$log->debug("FINDME");
            
$log->debug($user);
            
$log->debug($data);
        }
        if (!
is_null($data)) {
            foreach (
$data as $key => $value) {
                if (
is_string($value)) {
                    
$data[$key] = html_entity_decode($valueENT_QUOTES'utf-8');
                }
            }
        }
        
$this->data $data;
    } 
And again the user object ID is 6, but in data the assigned user id is 19x14, which is the user that this record originally is assigned to.
Reply


Messages In This Thread
RE: Adding a variable to the workflow expression engine - Guido1982 - 07-13-2018, 04:02 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)