Bug 841121 - Long description while creating system group returns PG error
Long description while creating system group returns PG error
Status: CLOSED UPSTREAM
Product: Red Hat Satellite 6
Classification: Red Hat
Component: WebUI (Show other bugs)
6.0.1
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: Bryan Kearney
Katello QA List
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-18 04:26 EDT by Sachin Ghai
Modified: 2013-09-19 14:12 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-19 14:12:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
PG Error: while creating sys group with long description (108.48 KB, image/png)
2012-07-18 04:26 EDT, Sachin Ghai
no flags Details

  None (edit)
Description Sachin Ghai 2012-07-18 04:26:17 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):
katello-0.2.45-1.el6.noarch

How reproducible:
always

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
  
Actual results:
PGError: ERROR: value too long for type character varying(255) : INSERT INTO "system_groups" ("created_at", "organization_id", "description", "updated_at"
<truncated>

Expected results:
Error message should be improved like:
Validation failed: System group description can not contain more than 255 characters.

Additional info:
Comment 1 Sachin Ghai 2012-07-18 04:30:16 EDT
The same issue appears when we pass long description while copying an existing sys_group.
Comment 2 Pavel Pokorny 2012-09-06 08:25:37 EDT
Fixed in b372ab1
Comment 3 Brad Buckingham 2012-09-06 08:44:35 EDT
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.
Comment 4 Pavel Pokorny 2012-09-06 09:23:50 EDT
I checked:

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
Comment 6 Mike McCune 2013-08-16 13:53:16 EDT
getting rid of 6.0.0 version since that doesn't exist
Comment 7 Mike McCune 2013-09-19 14:12:22 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.