Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-21870

defaultValue of property incorrect when queried

    Details

    • Type: Service Pack Request
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 6.2.2
    • Fix Version/s: 6.2.N
    • Component/s: ACS REST API
    • Labels:
      None
    • Environment:
      This was reproduced on a plain-vanilla ACS 6.2.2 deployed with docker-compose.
    • Bug Priority:
      Category 3
    • ACT Numbers:

      01015019

      Description

      Partner requested JIRA:

      Description

      The "classes" API correctly returns a JSON expression with the definition of the defined types, a specific type, or a specific property of a type. The defaultValue of each property is returned correctly when the API is used to retrieve all the types or a specific type. However, if the a type's property is queried, the default value will be returned as "defaultValues," and it will always return an empty string.

      Reproduction steps

      1. Enter the following URL on a browser to inspect all types and aspects:
        http://localhost:8080/alfresco/service/api/classes
      2. Pick a type that contains a property that has defaultValue that is not an empty string. For example, for this reproduction instructions I picked the type hwf:cancelledCloudTask, which has a property named bpm:packageItemActionGroup. The property has a defaultValue = "read_package_item_actions"
      3. Enter the following URL on a browser to get the definition and properties of the type hwf:cancelledCloudTask:
        http://localhost:8080/alfresco/service/api/classes/hwf_cancelledCloudTask. Search the property bpm:packageItemActionGroup. Notice the defaultValue of the property.
      4. Enter the following URL on a browser to inspect the type's property bpm:packageItemActionGroup:
        http://localhost:8080/alfresco/service/api/classes/hwf_cancelledCloudTask/property/bpm_packageItemActionGroup

      Expected results
      On step 4 we should see that the attribute "defaultValue" is "read_package_item_actions", as shown below:

      { "name": "bpm:packageItemActionGroup", "title": "Package Item Actions", "description": "Actions available on workflow package items", "defaultValue": "read_package_item_actions", "dataType": "d:text", "multiValued": false, "mandatory": false, "enforced": false, "protected": false, "indexed": true, "indexedAtomically": true, "constraints": [], "url": "\/api\/property\/bpm_packageItemActionGroup" }

      Actual results
      On step 4 we observe that the attribute "defaultValue" appears as "defaultValues", and its value is an empty string, as seen below. The attribute "defaultValues" is always returned as an empty string regardless of the actual value:

      { "name": "bpm:packageItemActionGroup", "title": "Package Item Actions", "description": "Actions available on workflow package items", "defaultValues": "", "dataType": "d:text", "multiValued": false, "mandatory": false, "enforced": false, "protected": false, "indexed": true, "indexedAtomically": true, "constraints": [], "url": "\/api\/property\/bpm_packageItemActionGroup" }

      Analysis and observations
      When a specific property is queried, the attribute "defaultValue" appears as "defaultValues" (in plural), and it is always an empty string (like "").

        Attachments

          Structure

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jgibson Jared Gibson
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Structure Helper Panel