Bug 841121 - Long description while creating system group returns PG error
Summary: Long description while creating system group returns PG error
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Bryan Kearney
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-18 08:26 UTC by Sachin Ghai
Modified: 2019-09-26 13:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-19 18:12:22 UTC
Target Upstream Version:
Embargoed:


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

Description Sachin Ghai 2012-07-18 08:26:17 UTC
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 08:30:16 UTC
The same issue appears when we pass long description while copying an existing sys_group.

Comment 2 Pavel Pokorny 2012-09-06 12:25:37 UTC
Fixed in b372ab1

Comment 3 Brad Buckingham 2012-09-06 12:44:35 UTC
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 13:23:50 UTC
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 17:53:16 UTC
getting rid of 6.0.0 version since that doesn't exist

Comment 7 Mike McCune 2013-09-19 18:12:22 UTC
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.