Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-17811

"URL Field" entry longer than 255 characters causes GenericEntityException

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Medium
    • 7.0.0
    • 3.13.4, 5.0.2, 5.0.5, 5.2.9, 6.0.6, 6.3.4, 6.4
    • Issue - Fields

    Description

      For a JIRA installation using MySQL (in strict mode), a URL entered into a custom field of type "URL Field" longer than 255 characters will lead to a GenericEntityException with error message Data truncation: Data too long for column 'STRINGVALUE' at row 1.

      If this happens during a workflow transition, an integrity check is needed (assuming no transactional database backend) - quite bothersome.

      I believe this is due to the fact that the length of the entry is not checked and stored with PersistenceFieldType TYPE_LIMITED_TEXT.

      Workarounds are of course a custom validator for said type or a custom extensions of it performing the validation. However I really think this should be fixed within JIRA, perhaps by a change of the persistance type, as URLs can get long.

      Another possible workaround would be to edit edit-basictext.vm to include a maxLength-attribute. The downside of this is that pasted content will be truncated silently.

      Attachments

        Issue Links

          Activity

            People

              hwiggers Dick (Inactive)
              0da998a71519 Michael Thomas
              Votes:
              14 Vote for this issue
              Watchers:
              20 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: