Uploaded image for project: 'mod-customfields'
  1. mod-customfields
  2. MODCFIELDS-56

Use camel-case names for auto-generated refIds, only use counter value if needed

    XMLWordPrintable

    Details

    • Template:
    • Sprint:
      eHoldings Sprint 93
    • Story Points:
      5
    • Development Team:
      Spitfire

      Description

      I'm not sure if this is a bug. Maybe I just don't understand what the refId field for custom fields is used for. Is it supposed to be the name of the JSON property that you use in the customFields property? I.e. If I define the following custom field,

      {
          "id": "3d6d013e-b5de-11ea-8902-005056999237",
          "name": "Student Id",
          "type": "TEXTBOX_SHORT",
          "order": 6,
          "refId": "student-id_1",
          "visible": true,
          "helpText": "",
          "metadata": {
              "createdDate": "2020-06-24T05:47:51.117+0000",
              "updatedDate": "2020-06-24T05:47:51.117+0000",
              "createdByUserId": "007bfea1-9311-4272-9269-798900d48752",
              "updatedByUserId": "007bfea1-9311-4272-9269-798900d48752",
              "createdByUsername": "diku_admin"
          },
          "required": false,
          "entityType": "user"
      }
      
      

      do, I use the following JSON when setting the value when inserting/updating a user?

      {
          ...
          "customFields": {
              "student-id_1": "1234567890"
          },
      }
      
      

      If so, the - and _ characters could be problematic. I think underscore would be fine, but, dash is problematic because the developer who is generating the JSON, may be using a language where - isn't a valid character for an identifier. For example, I'm using C# and I usually define my JSON as an object graph of dynamic objects. Then, I serialize the object to a string.

      I'm just guessing that refId is used as the JSON property name. I'm running a version of FOLIO that doesn't yet have full support for custom fields. So, I am guessing.

      Nonetheless, it would be helpful if there was an indication as to what the property names should be.

      Also, if it is used for JSON property names, it would be nice if the _1 counter variable at the end of the identifier was only used when needed (when there is already a field with the same name).

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                psmagin Pavlo Smahin
                Reporter:
                jemiller Jon Miller
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases