Yetiforcecrm: [bug] Change Assigned To to a user who edits a record Is not Working

Created on 28 Jun 2019  Β·  10Comments  Β·  Source: YetiForceCompany/YetiForceCRM

🐞 bug report

⁉️ Describe the bug


Yetiforce has a feature "Change Assigned To to a user who edits a record"
which when enabled suppose to change "assigned_to" field to the user who just made the edit.
However, it is not working and i was not able to find a function to do that.

πŸ”₯ How to trigger the error

Steps to reproduce the behavior:

  1. Go to https://gitdeveloper.yetiforce.com/index.php?module=MarketingProcesses&view=Index&parent=Settings&block=6&fieldid=83
  2. Click on 'Change Assigned To to a user who edits a record'
  3. Go to Leads and Open Any Lead which is not assigned to the user you are currently logged in
  4. Make any edit
  5. Assigned to left unchanged

πŸ‘Ž Actual Behavior

"assigned_to" field not changing after a user edit the record. (Option 'Change Assigned To to a user who edits a record' Enabled)

πŸ‘ Expected Behavior


"assigned_to" field changing after a user edit the record. (Option 'Change Assigned To to a user who edits a record' Enabled)

πŸ“· Screenshot of configuration


Gitdeveloper

πŸ“ PHP/Apache/Nginx/Browser/CRM Logs


Gitdeveloper

🌍 Your Environment



Gitdeveloper

❓ Additional context

Thats actually a great feature but only if it was working

❔ question

All 10 comments

Hi z0lo,
I investigated about that option and I didn't find any use of that variable. It seems that the "Change Assigned To to a user who edits a record" option in marketing process is not used :confused:

It seems.

Hi z0lo,
I investigated about that option and I didn't find any use of that variable. It seems that the "Change Assigned To to a user who edits a record" option in marketing process is not used πŸ˜•

It seems.

it is just a checkbox which do nothing basically.

When you check this option it won’t automatically change the owner of a record. When you convert a lead to an account it will only suggest the user who made the conversion to be the owner of the record.

For example, if user A is the owner of the lead, but user B converts the lead, and the option you’re asking about is enable, the pop up window will suggest user B to be the owner of the account.

Hi Paula,
you are right for CONVERSION: Change Assigned To: it works fine.
We are speaking about LEADS: Change Assigned To to a user who edits a record: it seems to be not used. If you tick the option and an user, who has got the role with privileges to change owner, modify a lead, owner doesn't change.

Hi Davide,
sorry, my bad! we were looking at the "leads" tab, not the "conversion" tab. Thanks for the clarification, we'll look into that again.

Paula,
please don't worry. We all have so many things to do and sometimes something escapes us.
:thumbsup:

@konadrian @davide-alghi


<?php

class ChangeOwner
{
    /**
     * Update Assigned Owner
     *
     * @param \Vtiger_Record_Model $recordModel
     * @throws \yii\db\Exception
     */
    public static function AssignedChange(Vtiger_Record_Model $recordModel)
    {
        \App\Log::trace('Entering AssignedChange');

        $userModel = App\User::getCurrentUserModel();
    $currentUserId = $userModel->getId();
        $leadId = $recordModel->getId();

        {
            App\Db::getInstance()->createCommand()->update('vtiger_crmentity', 
            ['smownerid' => $currentUserId,], 
            ['crmid' => $leadId])->execute();
    }

    \App\Log::trace('AssignedChange end');
    }
}

please z0lo enclose code between triple-single-quote

@davide-alghi
thats the class i added to my system to have it work as needed.

This option was deleted from crm

Was this page helpful?
0 / 5 - 0 ratings

Related issues

serbiaserbia picture serbiaserbia  Β·  3Comments

skramanzia picture skramanzia  Β·  3Comments

liberox picture liberox  Β·  3Comments

johntonji picture johntonji  Β·  3Comments

canomogollon picture canomogollon  Β·  3Comments