When users have a user_name longer than 40 characters they cannot download lists exported to Excel. When attempting to download, they are taken to a blank sys_attachment page.
Security restricted: Unable to read attachment sys_poll.45d8b8cf2b4202006c59ae6219da15d4
You will identify the problem because:
- The user_name's (on sys_created_by column) is truncated on the sys_poll table when over 40 characters
- This is due to the size of the column in the database is VARCHAR(40)
- Increasing the size of the username field is not recommended. If increasing the size, the affected users will remain affected as missing characters will not re-populate on the related tables.
- The report downloads are blocked by a sys_poll table level read ACL
Steps to Reproduce
With a user with an username longer than 40 characters, attempt to export to Excel from a list view using the UI
Please note this is working as expected. There are no plans to modify the current restriction on the username length. The solution is to manually change the username to a value of 40 characters or less.
Alternatively, (not recommended) you can modify the read ACL for sys_poll:
Change the script from:
answer = (current.sys_created_by == gs.getUserName());
answer = (current.sys_created_by == gs.getUserName().substring(0,40));
Related Problem: PRB645055