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

API Ability to identify format issues on UPDATES/PUT

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • REST API
    • None
    • 1
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      When using the results from a GET-Request and transforming this to a PUT while modifying custom fields the API notifies that there is an issue with the fields not being on the screen or unknown.

      {
          "errorMessages": [],
          "errors": {
              "lastViewed": "Field 'lastViewed' cannot be set. It is not on the appropriate screen, or unknown.",
              "watches": "Field 'watches' cannot be set. It is not on the appropriate screen, or unknown.",
              "creator": "Field 'creator' cannot be set. It is not on the appropriate screen, or unknown.",
              "subtasks": "Field 'subtasks' cannot be set. It is not on the appropriate screen, or unknown.",
      

      This message is returned even when the field is part of the screens. The issue is not related to fields not being part of the screen but related to how the PUT or update is formatted. The update format expected when editing an issue is the following mentioned on article API - Edit Issue.

      • Example:
        {"update":{"summary":[{"set":"Bug in business logic"}],"components":[{"set":""}],"timetracking":[{"edit":{"originalEstimate":"1w 1d","remainingEstimate":"4d"}}],"labels":[{"add":"triaged"},{"remove":"blocker"}]},"fields":{"summary":"This is a shorthand for a set operation on the summary field","customfield_10010":1,"customfield_10000":"This is a shorthand for a set operation on a text custom field"},"historyMetadata":{"type":"myplugin:type","description":"text description","descriptionKey":"plugin.changereason.i18.key","activityDescription":"text description","activityDescriptionKey":"plugin.activity.i18.key","actor":{"id":"tony","displayName":"Tony","type":"mysystem-user","avatarUrl":"http://mysystem/avatar/tony.jpg","url":"http://mysystem/users/tony"},"generator":{"id":"mysystem-1","type":"mysystem-application"},"cause":{"id":"myevent","type":"mysystem-event"},"extraData":{"keyvalue":"extra data","goes":"here"}},"properties":[{"key":"key1","value":'properties' : 'can be set at issue create or update time'},{"key":"key2","value":'and' : 'there can be multiple properties'}]}
        

      Please add a validation that the format is not correct on the API instead of notifying that the issue is related to the field not being part of the screen or unknown.

              Unassigned Unassigned
              dd46af19d4d5 Carlos Vigier (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: