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

Error while creating issues for team-managed (formerly next-gen) projects

    XMLWordPrintable

Details

    Description

      Discussion started in https://community.developer.atlassian.com/t/jira-cloud-next-gen-projects-and-connect-apps/23681/9. Creating a ticket to formally process it

       

      ------

      We’re seeing errors using the /rest/api/2/issue endpoint but there is no mention of impact in the bullets above. For example we see errors like the following with team-managed (formerly next-gen) projects.

      “description: Field ‘description’ cannot be set. It is not on the appropriate screen, or unknown.”

      but our API implementation works perfectly with classic projects. I can confirm the same user can create issues in the browser interface. Please advise.

      This is the problematic exchange. I’ve redacted the details.

       

      POST https://XXXX.atlassian.net/rest/api/2/issue
      
          Connection: keep-alive
          Accept-Encoding: gzip, deflate
          Accept: */*
          User-Agent: python-requests/2.19.1
          Content-Type: application/json
          Cookie: atlassian.xsrf.token=XXXXXXX
          Content-Length: 372
          Authorization: Basic XXXXXXXXXXX
          
          {"fields": {"project": {"key": "GFFW"}, "issuetype": {"id": "7"}, "labels": ["XXXX"], "description": "XXXXXXX", "summary": "CT627: test"}}
      
      400 Bad Request
          
          Server
          Cache-Control
          Content-Type
          Strict-Transport-Security
          Date
          ATL-TraceId
          X-AREQUESTID
          X-XSS-Protection
          Transfer-Encoding
          ATL-TCS-Time
          X-AUSERNAME
          X-Content-Type-Options
          Connection
          X-Seraph-LoginReason
          
          {"errorMessages":[],"errors":{"summary":"Field 'summary' cannot be set. It is not on the appropriate screen, or unknown.","description":"Field 'description' cannot be set. It is not on the appropriate screen, or unknown.","labels":"Field 'labels' cannot be set. It is not on the appropriate screen, or unknown."}} 

       

      These fields exist on the Create Issue page. Our implementation makes sure of it as well - since we pull the createmeta response. Here is a screenshot:

       

      Here is the API exchange for the problematic project,

      GET https://XXXXX.atlassian.net/rest/api/2/issue/createmeta?projectKeys=GFFW&issuetypeNames=Story&expand=projects.issuetypes.fields
          
          Connection: keep-alive
          Accept-Encoding: gzip, deflate
          Accept: */*
          User-Agent: python-requests/2.19.1
          Cookie: atlassian.xsrf.token=XXXXXX
          Authorization: Basic XXXXXXXX
      
      200 OK
          
          Server
          Vary
          Cache-Control
          Content-Type
          Content-Encoding
          Strict-Transport-Security
          Date
          ATL-TraceId
          X-AREQUESTID
          X-XSS-Protection
          Transfer-Encoding
          ATL-TCS-Time
          X-AUSERNAME
          X-Content-Type-Options
          Connection
          X-Seraph-LoginReason
          
          {"expand":"projects","projects":[{"expand":"issuetypes","self":"https://XXXX.atlassian.net/rest/api/2/project/27805","id":"27805","key":"GFFW","name":"geoffw","avatarUrls":{"48x48":"https://XXXX.atlassian.net/secure/projectavatar?avatarId=10403","24x24":"https://XXXX.atlassian.net/secure/projectavatar?size=small&avatarId=10403","16x16":"https://XXXX.atlassian.net/secure/projectavatar?size=xsmall&avatarId=10403","32x32":"https://XXXX.atlassian.net/secure/projectavatar?size=medium&avatarId=10403"},"issuetypes":[{"self":"https://XXXX.atlassian.net/rest/api/2/issuetype/10152","id":"10152","description":"Stories track functionality or features expressed as user goals.","iconUrl":"https://XXXX.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10315&avatarType=issuetype","name":"Story","subtask":false,"expand":"fields","fields":{"summary":{"required":true,"schema":{"type":"string","system":"summary"},"name":"Summary","key":"summary","hasDefaultValue":false,"operations":["set"]},"issuetype":{"required":true,"schema":{"type":"issuetype","system":"issuetype"},"name":"Issue Type","key":"issuetype","hasDefaultValue":false,"operations":[],"allowedValues":[{"self":"https://XXXX.atlassian.net/rest/api/2/issuetype/10152","id":"10152","description":"Stories track functionality or features expressed as user goals.","iconUrl":"https://XXXX.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10315&avatarType=issuetype","name":"Story","subtask":false,"avatarId":10315}]},"attachment":{"required":false,"schema":{"type":"array","items":"attachment","system":"attachment"},"name":"Attachment","key":"attachment","hasDefaultValue":false,"operations":[]},"description":{"required":false,"schema":{"type":"string","system":"description"},"name":"Description","key":"description","hasDefaultValue":false,"operations":["set"]},"project":{"required":true,"schema":{"type":"project","system":"project"},"name":"Project","key":"project","hasDefaultValue":false,"operations":["set"],"allowedValues":[{"self":"https://XXXX.atlassian.net/rest/api/2/project/27805","id":"27805","key":"GFFW","name":"geoffw","projectTypeKey":"software","avatarUrls":{"48x48":"https://XXXX.atlassian.net/secure/projectavatar?avatarId=10403","24x24":"https://XXXX.atlassian.net/secure/projectavatar?size=small&avatarId=10403","16x16":"https://XXXX.atlassian.net/secure/projectavatar?size=xsmall&avatarId=10403","32x32":"https://XXXX.atlassian.net/secure/projectavatar?size=medium&avatarId=10403"}}]},"issuelinks":{"required":false,"schema":{"type":"array","items":"issuelinks","system":"issuelinks"},"name":"Linked Issues","key":"issuelinks","autoCompleteUrl":"https://XXXX.atlassian.net/rest/api/2/issue/picker?currentProjectId=&showSubTaskParent=true&showSubTasks=true&currentIssueKey=null&query=","hasDefaultValue":false,"operations":["add"]},"reporter":{"required":true,"schema":{"type":"user","system":"reporter"},"name":"Reporter","key":"reporter","autoCompleteUrl":"https://XXXX.atlassian.net/rest/api/latest/user/search?query=","hasDefaultValue":true,"operations":["set"]},"assignee":{"required":false,"schema":{"type":"user","system":"assignee"},"name":"Assignee","key":"assignee","autoCompleteUrl":"https://XXXX.atlassian.net/rest/api/latest/user/assignable/search?project=GFFW&query=","hasDefaultValue":false,"operations":["set"]},"labels":{"required":false,"schema":{"type":"array","items":"string","system":"labels"},"name":"Labels","key":"labels","autoCompleteUrl":"https://XXXX.atlassian.net/rest/api/1.0/labels/suggest?query=","hasDefaultValue":false,"operations":["add","set","remove"]},"customfield_13017":{"required":false,"schema":{"type":"number","custom":"com.atlassian.jira.plugin.system.customfieldtypes:float","customId":13017},"name":"Story point estimate","key":"customfield_13017","hasDefaultValue":false,"operations":["set"]}}}]}]}
       

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            jferrogarcia Xavier Ferro (Inactive)
            Votes:
            21 Vote for this issue
            Watchers:
            24 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: