Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-62188

Read Only Text Field Cannot be Cleared

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for JIRA Cloud. Using JIRA Server? See the corresponding bug report.

      It affects built-in

      "Text Field (Read Only)"
      * This is the one that must be updated via code
      

      Steps to Reproduce

      • Create a new issue ticket where the field is visible
      • Add a value to the field via REST API:
        curl -D- -u admin:admin -X PUT --data '{"fields":{"customfield_10200":"something for something"}}' -H "Content-Type: application/json" http://localhost:8080/rest/api/2/issue/SSP-24
        
        • in my case, the field id is 10200 and the ticket that I'm modifying is SSP-24
      • Verify that the new value exists by accessing the ticket via web browser
      • Now attempt to clear the field. For example these work for other text fields (single line and multi-line):
        curl -D- -u admin:admin -X PUT --data '{"fields":{"customfield_10200":null}}' -H "Content-Type: application/json" http://localhost:8080/rest/api/2/issue/SSP-24
        
        curl -D- -u admin:admin -X PUT --data '{"fields":{"customfield_10200":""}}' -H "Content-Type: application/json" http://localhost:8080/rest/api/2/issue/SSP-24
        
      • Reload the issue ticket and the ticket still has a value in it

      Workaround: updating the field to only contain a space:

      curl -D- -u admin:admin -X PUT --data '{"fields":{"customfield_10200":" "}}' -H "Content-Type: application/json" http://localhost:8080/rest/api/2/issue/SSP-24
      
      • Looks like you need to have some sort of data, so it requires that extra (space) within the " "
      • The downside to this workaround is if there are JQL attempting to filter for this field as EMPTY

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dchan David Chan
              Votes:
              8 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: