Closed (fixed)
Project:
User Points
Version:
7.x-1.x-dev
Component:
Code: userpoints API
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Oct 2010 at 03:31 UTC
Updated:
15 Dec 2010 at 10:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
berdirI noticed the problem too, however that it automatically got truncated seems to be your browser. In my case, it simply said that the text was too long for that field. Looks like the UI enforces a shorter operation than the API.
Comment #2
berdirFix is simple, but we might want to think if we want to increase the limit of some of these columns while we are on it. We must however check if this doesn't influence anything else...
For example, operation and entity type are limited to 32 characters (privatemsg_message is 18) and reference is limited to 128 characters.
Edit: Oh, I forgot to mention that the missing description is a because of the truncated operation column, because it doesn't correspond to the defined operation by userpoints_nc.module anymore. So this will be fixed too.
Comment #3
BenK commentedAdding a note to add the following to this patch since it involves schema changes:
a) In the database, it looks like the "expired" field has an incorrect comment. It says "User ID" currently, but it looks like that field is meant to indicate if the transaction is expired or not.
b) Should we change the field name in the database from Approver ID to Moderator ID? And change the field comment? Or would this cause a problem elsewhere?
--Ben
Comment #4
BenK commentedThe patch in #2 worked great. The operation is no longer truncated and the description isn't disappearing from the 'Reason' anymore. Should we maybe go from 32 characters to 48 character limit if this doesn't negatively impact anything else?
The reason is because other UP related modules could supply fairly long operation fields (like UP-NC did). So it might be safer to have a longer limit if a module, for instance, as a long machine name.
Also, do you want to address comment #3 schema stuff in this thread or somewhere else?
Finally, I noticed that the description supplied by UP-NC is not actually displayed in the description field on the edit screen (the description field just appears blank). Shouldn't the description be appearing there and editable? If you enter a description manually, it will save it, but the 'Reason' column won't be updated. I'm not sure if we necessarily want that 'Reason' column to be editable, but we might. I thought I'd mention it.
--Ben
Comment #5
BenK commentedOne of the last few issues remaining before a 7.x-alpha1 release...
Comment #6
BenK commentedAt http://drupal.org/node/871096 (Userpoints Node and Comments module), Berdir suggested that truncation length should be a setting in Userpoints.module instead of UP-NC. So should we deal with this on this thread?
Here is an updated label and description for this setting in userpoints.module:
Label: Truncation length for 'Reason' field
Description: Choose the truncation length in characters for the 'Reason' field on !points transactions.
--Ben
Comment #7
berdirOk, getting back to this.
#3 a) Updated the descriptions
b) I think we should leave that for now. Only updated the description.
#4) Increased to 48 characters, entity_type to 128, that is consistent with how field.module is doing it. I think the description stuff has been resolved elsewhere.
#6) Let's do that in a separate issue.
Comment #9
BenK commentedI tried the latest patch and everything works great. The database schema looks good and truncation is no longer occurring.
I'm not sure why the test bot failed, however.
So I'm marking this as RTBC, but we may want to change status back if there is a relevant reason why the test bot is failing.
--Ben
Comment #10
berdirTest bot is playing strange, our Tests passed, Rules Scheduler has nothing to do with us.
Commited.