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

Values of ReadOnly fields are deleted during update action.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • High
    • 5.1.6, 5.2-m06
    • 5.0.6, 5.1.3
    • None
    • JIRA 5.0.6
      Linux Centos 6.2

    Description

      I have upgraded JIRA from version 4.1.1 to latest one and I have noticed that during "Edit" action all values from ReadOnly custom fields vanish.
      I have fixed it by adding "edit" resource to the all custom read only fields:
      for example
      In system-customfieldtypes-plugin.xml file I have added the following line to the "importid" customfield section

      <resource name="edit" type="velocity" location="templates/plugins/fields/edit/edit-readonly-basictext.vm"/>
      

      and I've added new file based on existing edit-basictext.vm

      edit-readonly-basictext.vm
      #customControlHeader ($action $customField.id $customField.name $fieldLayoutItem.required $displayParameters $auiparams)
          <input class="text" id="$customField.id" name="$customField.id" type="text" value="$textutils.htmlEncode($!value)" readonly="readonly" />
      #customControlFooter ($action $customField.id $fieldLayoutItem.fieldDescription $displayParameters $auiparams)
      

      I have fixed it one day after upgrade so I had to recover only few issues but this very serious bug. I don't know whether it concerns only version 5.0.6 or maybe other previous versions.

      Attachments

        Issue Links

          Activity

            People

              edalgliesh Eric Dalgliesh
              7ee8cae5c301 Andrzej Warycha
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: