User ID Length - user_name and attachment sys_created_by
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2015 02:56 PM
All,
I've come across a problem with a user not being able to upload a file to a form. After much looking around, I found out that because the user's user ID is longer than 40 characters, it couldn't save the attachment to the attachments table.
I see:
Sys_user.user_name field max chars 100
Sys_attachment. sys_updated_by max chars 40. Sys_created_by also
Sys_attachment2 is also 40 characters.
It is saving the user's user_name field in plain text rather than using a reference to a sys_id.
Now I know that we can extend the 40 character limit to 100 and the problem will go away, which is the easy answer but could have some knock-on effect with performance temporarily.
I am looking to hear from other people who may have come across this and I would like to ask what you did in your organisation?
I can see several options (some more worthy than others in different ways)
a) Increase the limit to 100 chars on the two attachments tables.
b) Truncate the user's ID to 40 characters before saving.
c) Not permitting user ID's of such length.
d) Using sys_id's instead of user names.
e) Something else??
How did you handle this issue if you've seen it?
Kind regards,
Steve
- Labels:
-
Enterprise Release Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2015 05:05 PM
The only thing found was PRB604733
This was quoted in the report to HI to see if it is related or not, which I am currently unsure of.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2015 11:48 AM
Steve,
What version are you on? I just ran a quick test on my Fuji Patch 7 instance and a username with 46 characters was able to create an incident, and then after submitting it, was able to successfully attach a file. The sys_created_by/sys_updated_by fields were automatically truncated to 40 characters.
sys_created_by and sys_updated_by are on every table and they are all set to Strings with a 40 character limit. If there was a bug related to usernames longer than 40 characters I would expect you to have problems on all tables, not just the attachment table.
Thanks
Brian