Uploaded image for project: 'Jira Server and Data Center'
  1. Jira Server and Data Center
  2. JRASERVER-36979

User Directory filter throws a 'value too long' error when Filter exceeds 255 chars

    XMLWordPrintable

    Details

    • Introduced in Version:
      6.01
    • Support reference count:
      52
    • Regular Expression:
      value too large for column
    • Symptom Severity:
      Severity 3 - Minor
    • Occurrence Factor:
      10%
    • Development Effort:
      S
    • Risk:
      High
    • UIS:
      44
    • Current Status:
      Hide
      Atlassian Update – 21 December 2018

      Dear Jira users,

      We’re glad to announce that this issue will be addressed in our upcoming 8.0 release.

      You can find more details about our 8.0 beta release here — https://community.developer.atlassian.com/t/beta-for-jira-8-0-is-up-for-grabs/25588

      Looking forward to your feedback!

      Kind regards,
      Syed Masood
      Product Manager, Jira Server and Data Center

      Show
      Atlassian Update – 21 December 2018 Dear Jira users, We’re glad to announce that this issue will be addressed in our upcoming 8.0 release. You can find more details about our 8.0 beta release here — https://community.developer.atlassian.com/t/beta-for-jira-8-0-is-up-for-grabs/25588 Looking forward to your feedback! Kind regards, Syed Masood Product Manager, Jira Server and Data Center

      Description

      Steps to Reproduce:

      Create a User Directory with a User/Group filter larger than 255 chars.

      Expected Results:

      JIRA should give an error on the same screen explaining the value is too big

      Actual Results:

      JIRA throws a "We had some technical problems during your last operation.
      We deeply apologize for that " error page with the response from the database

      Request processing failed; nested exception is com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:DirectoryAttribute][directoryId,10001][name,ldap.user.filter][value,(&(objectCategory=Person)(sAMAccountName=*)(|(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)))] (SQL Exception while executing the following:INSERT INTO public.cwd_directory_attribute (directory_id, attribute_name, attribute_value) VALUES (?, ?, ?) (ERROR: value too long for type character varying(255)))
      

      Workaround

      Note: Before trying these steps, it is very important to both create a backup of your SQL data as well as to then stop Jira before trying these steps. Take a note of the configuration as well as there are multiple cases that have reported that the configuration will be missing after increase the column size.

      It is currently possible to work-around this issue by following the steps in the KB Data truncation due to data too long for column - Atlassian Documentation.

      1. Create a backup of your SQL data in Jira.  Backing up data - Atlassian Documentation has details on how to do this, but Atlassian recommends using the native database backup tools for this instead of relying upon the XML backup.
      2. Stop Jira
      3. You can then run the following SQL commands against the database to change these column sizes (this syntax is correct for postgresql, other versions of SQL might have a different syntax)
        alter table cwd_directory_attribute alter column attribute_value type varchar (400);

        Note: this example expands the column to accept 400 characters in this case. You might need a larger value here should your filter be still greater than this.

      4. Start Jira

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                psuwala Piotr Suwala
                Reporter:
                malmeida Marcus Silveira
              • Votes:
                72 Vote for this issue
                Watchers:
                84 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: