UI16: Unable to impersonate user if sys_user_preference for m_sort (mobile sort) is using invalid sort field


Description

UI16: Unable to impersonate user if sys_user_preference for m_sort (mobile sort) is using invalid sort field

Steps to Reproduce

 

  1. Navigate to User Administration > Users.

  2. Change the view to Mobile.

    /nav_to.do?uri=/sys_user_list.do%3Fsysparm_view/Mobile&sysparm_userpref.sys_user_list.view/Mobile&sysparm_userpref.sys_user.view/Mobile&sysparm_query/&sysparm_fixed_query/

  3. Right-click the Name column and choose Configure > List Layout.

  4. Add Last Name and click Save.

  5. Impersonate Fred Luddy.

  6. Navigate to Mobile > User Administration > Users.

    $m.do#/!list/sys_user

  7. Change sort to 'Last name', ascending.

    In sys_user_preference, a new record for Fred Luddy is created with Name=m_sort:

    nav_to.do?uri=sys_user_preference.do?sys_id=9ec3d4f613fe12003c4ebdb12244b028

  8. It will have the following value:

    {"l_s_sys_user":"last_name,ascending"}

  9. Go back to Mobile view for User [sys_user] and remove Last name from the list layout.

    nav_to.do?uri=/sys_user_list.do%3Fsysparm_view/Mobile&sysparm_userpref.sys_user_list.view/Mobile&sysparm_userpref.sys_user.view/Mobile&sysparm_query/&sysparm_fixed_query/

  10. Right-click the Name column and choose Configure > List Layout.

  11. Remove Last Name and click Save.

  12. Still as Fred Luddy, choose Impersonate User and click into the Search for user field.

    You cannot type the name of a user in the field due to the invalid sort field.

Workaround

This issue can be solve in either of the following two ways:


Related Problem: PRB671119