Support

Expand all | Collapse all

API get item call Fields question

  • 1.  API get item call Fields question

    Posted 16 days ago
    Hi,

    We've added a few extra fields to the Defect item type in our project.  When requesting the item from the API these extra fields aren't being added to the response string,  we only see the following:

    "fields": {
    "documentKey": "xxx2-BUG-1",
    "globalId": "GID-49756",
    "name": "Defect 1 ",
    "description": "<p>no show of A</p>\n",
    "priority": 301,
    "assignedTo": 16
    },


    Is this normal behavior? and how would it be possible to get and set these extra fields?

    Thanks,

    ------------------------------
    Yotam
    Toronto ON
    ------------------------------


  • 2.  RE: API get item call Fields question

    Posted 14 days ago
    Yotam,
    This doesn't appear to be normal behavior. When you hit the /items endpoint for an item with custom fields, the data should display in the form
    "state$117": false
    with 'state' being the name of the custom field, '$###' being a custom field identifier, and 'false' being the value. Could you reconfirm that the new item type has the custom field added to it, and that the item you are testing matches the updated item type?

    ------------------------------
    Abby Embree
    Jama Software
    ------------------------------



  • 3.  RE: API get item call Fields question

    Posted 14 days ago
    Hi Abby,

    Thanks for the quick reply.

    I added a second item to the collection and was able to retrieve the additional fields for that one.  The original item did not show the extra fields until I updated the data in the fields.

    Is this normal behaviour?

    Thanks,

    ------------------------------
    Yotam
    Toronto ON
    ------------------------------



  • 4.  RE: API get item call Fields question

    Posted 6 days ago
    Yotam,
    I tried to reproduce the behavior you described, but when I added a new custom field to an item type, it showed up in the API data for a previously created item of the same type without me having to edit the data of the item. I would recommend you open a support ticket so we can troubleshoot the issue more in-depth.

    ------------------------------
    Abby Embree
    Jama Software
    ------------------------------