Uploaded image for project: 'Proforma Server & Data Centre'
  1. Proforma Server & Data Centre
  2. FORMDC-800

Updates larger than mapped field are not saved and no error is thrown

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 10.2.0, 8.8.6
    • 2
    • Severity 2 - Major

      Issue Summary

      Proforma does not save the value in the mapped field and no error is thrown when a form question is mapped to a field with character limitations,  the question does not limit the characters, and the entry text is longer than the supported limited from the mapped field.

      If multiple fields are set in the form, due to the condition above, one or more different fields are also affected and not correctly saved in the issue.

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Create a form with a question mapped to a limited field, for example the "Summary" field (which is 255 chars limited), and don't limit the number of characters in the question 
      2. Create an issue using the form and add in that question a longer text than 255 characters.

      Expected Results

      • Update the field with the trimmed value (limited to the character limit of the mapped field, such as when creating an out-of-the-box issue and adding a long text in Summary, where the text is trimmed to 255 chars). or
      • Throw an UI error indicating the form could not update the issue given the exception. 

      The other fields, not related to the one with long text, should be saved as expected.

      Actual Results

      The issue is not updated, and no error is thrown in the UI (although the form is updated). In log, we have messages such as: 

      /servicedesk/customer/portal/3/create/24 [c.t.p.jira.server.FieldServerApi] Error applying fields to issue JB-21 due to: org.ofbiz.core.entity.GenericEntityException: while updating: [GenericEntity:Issue][summary,LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG][description,LONG LONG LONG LONG LONG LONG ][id,24000][updated,2024-07-23 12:51:03.563] (SQL Exception while executing the following:UPDATE public.jiraissue SET SUMMARY=?, DESCRIPTION=?, UPDATED=? WHERE ID=? (ERROR: value too long for type character varying(255)))
      com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while updating: [GenericEntity:Issue][summary,LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG][description,LONG LONG LONG LONG LONG LONG ][id,24000][updated,2024-07-23 12:51:03.563] (SQL Exception while executing the following:UPDATE public.jiraissue SET SUMMARY=?, DESCRIPTION=?, UPDATED=? WHERE ID=? (ERROR: value too long for type character varying(255)))
      	at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.storeAll(DefaultOfBizDelegator.java:259)
      	at com.atlassian.jira.ofbiz.WrappingOfBizDelegator.storeAll(WrappingOfBizDelegator.java:151)
      	at com.atlassian.jira.issue.util.DefaultIssueUpdater.storeModifiedFields(DefaultIssueUpdater.java:120)
      	at com.atlassian.jira.issue.util.DefaultIssueUpdater.doUpdate(DefaultIssueUpdater.java:94)
      	at com.atlassian.jira.issue.util.DefaultIssueUpdater.doUpdate(DefaultIssueUpdater.java:68)
      	at com.atlassian.jira.issue.managers.DefaultIssueManager.doUpdate(DefaultIssueManager.java:702)
      	at com.atlassian.jira.issue.managers.DefaultIssueManager.updateIssue(DefaultIssueManager.java:673)
      ...
      Caused by: org.ofbiz.core.entity.GenericEntityException: while updating: [GenericEntity:Issue][summary,LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG][description,LONG LONG LONG LONG LONG LONG ][id,24000][updated,2024-07-23 12:51:03.563] (SQL Exception while executing the following:UPDATE public.jiraissue SET SUMMARY=?, DESCRIPTION=?, UPDATED=? WHERE ID=? (ERROR: value too long for type character varying(255)))
      	at org.ofbiz.core.entity.GenericDAO.singleUpdate(GenericDAO.java:364)
      ...
      Caused by: org.ofbiz.core.entity.GenericEntityException: while updating: [GenericEntity:Issue][summary,LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG][description,LONG LONG LONG LONG LONG LONG ][id,24000][updated,2024-07-23 12:51:03.563] (SQL Exception while executing the following:UPDATE public.jiraissue SET SUMMARY=?, DESCRIPTION=?, UPDATED=? WHERE ID=? (ERROR: value too long for type character varying(255)))
      	at org.ofbiz.core.entity.GenericDAO.singleUpdate(GenericDAO.java:364)
      ...
      Caused by: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:UPDATE public.jiraissue SET SUMMARY=?, DESCRIPTION=?, UPDATED=? WHERE ID=? (ERROR: value too long for type character varying(255))
      	at org.ofbiz.core.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:570)
      	at org.ofbiz.core.entity.GenericDAO.singleUpdate(GenericDAO.java:358)
      	... 89 more
      Caused by: org.postgresql.util.PSQLException: ERROR: value too long for type character varying(255)
      	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2675)
      
      

      The exception is thrown in the atlassian-jira.log file.

      One or more other form questions are also affected and the value set in it are not saved in the mapped field.

      Workaround

      After observing what mapped field has character limitation, update the form to limit the question related to that field with the same limit value.

        1. form.png
          form.png
          351 kB
        2. linked-fields-broken.png
          linked-fields-broken.png
          798 kB
        3. linked-fields-working.png
          linked-fields-working.png
          593 kB

              b7eb103390a7 Nayan Kurude
              b99328de92bd Douglas Alves
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: