Bug 1177158

Summary: Description fields need to be consistent across Katello
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: WebUIAssignee: David Davis <daviddavis>
WebUI sub component: Katello QA Contact: Corey Welton <cwelton>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: bbuckingham, bkearney, cfouant, cwelton, daviddavis, jyejare, mmccune, oshtaier, rplevka, sghai, sthirugn
Version: NightlyKeywords: Regression, Triaged
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/9344
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 08:44:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Description Flags
description field accepts more than 1000 char while creating and updating activation key none

Description Sachin Ghai 2014-12-24 16:10:23 UTC
Description of problem:

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:

Comment 1 Sachin Ghai 2014-12-24 16:18:58 UTC
when we create activation-key, the description field accepts greater than 1000 characters. This is happening while creating as well as updating the description. Earlier the limit was set for 1000 characters. Now user can add any number of characters in description field.


* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.9.37-1.el6.noarch
* candlepin-common-1.0.17-1.el6.noarch
* candlepin-selinux-0.9.37-1.el6.noarch
* candlepin-tomcat6-0.9.37-1.el6.noarch
* elasticsearch-0.90.10-7.el6.noarch
* foreman-1.8.0-0.develop.201412181705git9e844ba.el6.noarch
* foreman-compute-1.8.0-0.develop.201412181705git9e844ba.el6.noarch
* foreman-gce-1.8.0-0.develop.201412181705git9e844ba.el6.noarch
* foreman-libvirt-1.8.0-0.develop.201412181705git9e844ba.el6.noarch
* foreman-ovirt-1.8.0-0.develop.201412181705git9e844ba.el6.noarch
* foreman-postgresql-1.8.0-0.develop.201412181705git9e844ba.el6.noarch
* foreman-proxy-1.8.0-0.develop.201412171625git51c455b.el6.noarch
* foreman-release-1.8.0-0.develop.201412181705git9e844ba.el6.noarch
* foreman-selinux-1.8.0-0.develop.201412151103gite2863e4.el6.noarch
* foreman-vmware-1.8.0-0.develop.201412181705git9e844ba.el6.noarch
* katello-2.1.0-1.201411061509gitb0b8f43.el6.noarch
* katello-certs-tools-2.0.1-1.el6.noarch
* katello-default-ca-1.0-1.noarch
* katello-installer-2.1.0-1.201412180333gitb02e8f2.el6.noarch
* katello-installer-base-2.1.0-1.201412180333gitb02e8f2.el6.noarch
* katello-repos-2.1.1-1.el6.noarch
* katello-server-ca-1.0-1.noarch
* openldap-2.4.39-8.el6.x86_64
* pulp-docker-plugins-0.2.1-0.2.beta.el6.noarch
* pulp-katello-0.3-3.el6.noarch
* pulp-nodes-common-2.5.0-0.7.beta.el6.noarch
* pulp-nodes-parent-2.5.0-0.7.beta.el6.noarch
* pulp-puppet-plugins-2.5.0-0.7.beta.el6.noarch
* pulp-puppet-tools-2.5.0-0.7.beta.el6.noarch
* pulp-rpm-plugins-2.5.0-0.7.beta.el6.noarch
* pulp-selinux-2.5.0-0.7.beta.el6.noarch
* pulp-server-2.5.0-0.7.beta.el6.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-ldap_fluff-0.3.3-1.el6.noarch
* ruby193-rubygem-net-ldap-0.10.0-1.el6.noarch
* ruby193-rubygem-runcible-1.3.0-1.el6.noarch
* rubygem-hammer_cli-0.1.4-1.el6.noarch
* rubygem-hammer_cli_foreman-0.1.4-1.el6.noarch
* rubygem-hammer_cli_foreman_bootdisk-0.1.2-1.el6.noarch
* rubygem-hammer_cli_foreman_tasks-0.0.3-2.201409091410gitc96619d.git.0.37f3704.el6.noarch
* rubygem-hammer_cli_import-0.10.4-1.el6.noarch
* rubygem-hammer_cli_katello-0.0.6-1.201412181307git280ed45.git.0.52b14f3.el6.noarch

Steps to reproduce:

1. Go TO contents-->  activation_key
2. New key form -> enter description greater than of 1000 chars

Actual result: Description accepts more than 1000 characters while creating/updating the key.
Earlier the limit was set to 1000 char, now no limit set on this.

Expected result: validation error should be raised once the limit exceeds 1000 char

Comment 2 Sachin Ghai 2014-12-24 16:20:51 UTC
Created attachment 972792 [details]
description field accepts more than 1000 char while creating and updating activation key

Comment 3 RHEL Program Management 2014-12-24 16:24:05 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 6 Christine Fouant 2015-02-11 21:36:48 UTC
Created redmine issue http://projects.theforeman.org/issues/9344 from this bug

Comment 7 Christine Fouant 2015-02-12 14:23:03 UTC
So, we now do not need the 1000 character limit, as we are validating lengths from the database itself. Is there any additional argument as to why we should limit the description field?

Comment 8 Sachin Ghai 2015-02-17 06:47:34 UTC
Hi Christine, we have automation around this issue. So earlier a limit of 1000 char was set on description field. So this bz is around the existing behavior.

Now user can add long description for activation-key. And there is no limit set for this field for UI. If we are planning to validate field length at database level then it should be consistent around all features.

For ex: for content-view description field 256 char limit is set.

Comment 9 Christine Fouant 2015-02-18 16:57:55 UTC
I agree that description lengths should be consistent, but there shouldn't be consistently a 256 limit. Please file a bug for any object that has a limit of 256, and I can confirm that content views are such a case. 

Given this, I believe the above, I do believe this bug should be closed. Please do so, unless you disagree.

Comment 10 Christine Fouant 2015-02-27 16:11:00 UTC
I am going to repurpose this bug to make all description fields consistent across Katello. We should also remove description from table columns to avoid having a 1000+ characters taking up a small field in a table.

Comment 12 Mike McCune 2015-03-02 18:10:27 UTC
This isn't high priority enough for 6.1, moving to 6.2

Comment 13 Bryan Kearney 2015-03-02 19:04:36 UTC
Upstream bug assigned to cfouant@redhat.com

Comment 14 David Davis 2015-03-03 16:02:52 UTC
Ok, with these two PRs every description field in foreman and katello is a text field which is pretty much unlimited in PostgreSQL. 


Comment 16 Tazim Kolhar 2015-11-05 13:04:47 UTC
*** This bug is verified in upstream.  This fix should eventually land in future downstream builds ***
Version Tested:
# rpm -qa | grep foreman

1. Go TO contents-->  activation_key
2. New key form -> enter description greater than of 1000 chars

validation error is raised once the limit exceeds 1000 char

Comment 17 Roman Plevka 2016-02-16 11:05:56 UTC
(In reply to Christine Fouant from comment #7)
> So, we now do not need the 1000 character limit, as we are validating
> lengths from the database itself. Is there any additional argument as to why
> we should limit the description field?

uhm, how about the UI? The browser goes crazy with 7MB-worth description text :) Also, isn't there a size restriction for a HTTP request?

Comment 19 Oleksandr Shtaier 2016-04-22 07:57:04 UTC
Not sure what was verified in that defect, but we don't have any limitation for description field, so gonna to remove corresponding test automation cases

Comment 22 errata-xmlrpc 2016-07-27 08:44:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.