Red Hat Bugzilla – Bug 841121
Long description while creating system group returns PG error
Last modified: 2013-09-19 14:12:22 EDT
Created attachment 598814 [details]
PG Error: while creating sys group with long description
Description of problem:
I was trying to create a system group and when I enter a long description ( more than 255 charcters) and click on save, UI riased a long error message:
PGError: ERROR: value too long for type character varying(255) : INSERT INTO "system_groups" ("created_at", "organization_id", "description", "updated_at", "pulp_id", "name", "max_systems") VALUES ('2012-07-18 05:14:19.114868', 1, 'and to test the decription with long text. Description with long text is supported. But I guess not in this case as I got an PG error and trying to reproduce. Not sure if I can reproduce it but just giving it a try. Let see what happens in this case. Lets try to add more text to reproduce that PG error.', '2012-07-18 05:14:19.114868', 'ACME_Corporation-testgrp-54a00821', 'testgrp', -1) RETURNING "id"
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Go to systems => select system groups
2. Click 'new system group" and enter name and long description
3. click on save
PGError: ERROR: value too long for type character varying(255) : INSERT INTO "system_groups" ("created_at", "organization_id", "description", "updated_at"
Error message should be improved like:
Validation failed: System group description can not contain more than 255 characters.
The same issue appears when we pass long description while copying an existing sys_group.
Fixed in b372ab1
From looking at the code, it looks like this issue may exist in multiple models. I'd recommend that we address all of them with this BZ and document the impacted models in the BZ resolution. Given this is a small change, I think that would be better than creating a separate BZ for each case.
activation_key - ok
changeset - ok
kt_environment - ok
organization - ok
permission - ok
provider - ok
role - there was limit in migration to 250 chars so i modified validation
sync_plan - added validation
system_group - ok
system_template - ok
system - ok
getting rid of 6.0.0 version since that doesn't exist
These bugs have been resolved in upstream projects for a period of months so I'm mass-closing them as CLOSED:UPSTREAM. If this is a mistake feel free to re-open.