Uploaded image for project: 'stripes-connect'
  1. stripes-connect
  2. STCON-95

Duplicate redux store keys prohibit correct path resolution

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Template:
      Standard Bug Write-Up Format
    • Development Team:
      Stripes Force

      Description

      Maxim Didenko ran into an issue in ui-users under settings where the execution similar to:

          this.props.mutator.activeRecord.update({ ownerId });
          return this.props.mutator.owners.PUT(owner);
      

      didn't work for this manifest:

          owners: {
            type: 'okapi',
            records: 'owners',
            path: 'owners?query=cql.allRecords=1 sortby owner&limit=500',
            accumulate: 'true',
            PUT: {
              path: 'owners/%{activeRecord.ownerId}',
            }
          },
          activeRecord: {},
      

      and the path was not resolved correctly.

      This is because it looks like redux store contains duplicate keys for active record:

      folio_users_activeRecord
      feefinestable#folio_users_activeRecord
      

      one holds the correct data (ownerId) but the other one is empty.

      The feefinestable#folio_users_activeRecord exists because of the dataKey passed in settings:

      https://github.com/folio-org/stripes-smart-components/blob/20846e21149a28183d138668755501418e54d5b9/lib/Settings/Settings.js#L43

      We are not sure why the other key is also present.

        TestRail: Results

          Attachments

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              mpk35 Michal Kuklis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  TestRail: Runs

                    TestRail: Cases