wrenidm icon indicating copy to clipboard operation
wrenidm copied to clipboard

[5.5.0] "Association" Tab Fails to Load on User Mappings when Preferences are Missing

Open GuyPaddock opened this issue 6 years ago • 0 comments

Affected Versions

  • 5.5.0 (master, at 834a17c)

Summary

If you are defining a mapping to Managed User objects, and your Managed User object model does not have a preferences field, you cannot access the "Association" tab of the UI when editing the mapping. In addition, after opening the tab, you cannot access other tabs until you refresh the page.

Steps to Reproduce

  1. Start OpenIDM with any project that has mappings (e.g. the "Getting Started" sample project).
  2. Edit the "User" managed object and remove the "Preferences" field. (Alternatively, remove the field for the user object in the managed.json file)
  3. Navigate to http://localhost:8080/admin/
  4. Navigate to Configure -> Mappings.
  5. Open Developer Tools in the browser and leave it open to the "Console" tab.
  6. Back in the page, create a new mapping to the user object OR edit an existing mapping that references the user object.
  7. Switch to the "Association" tab.
  8. Attempt to expand and collapse the "Association Rules" section.
  9. Attempt to switch to the "Properties" tab.
  10. Examine the developer tools console.

Expected Results

  • No errors appear in the console during steps 5-10.
  • In step 8, the section opens.
  • In step 9, the view switches to the "Properties" tab.

Actual Results

  • The following error appears:
IndividualRecordValidationView.js:48 Uncaught TypeError: Cannot read property 'properties' of undefined
    at s.<anonymous> (IndividualRecordValidationView.js?v=5.5.0-SNAPSHOT:48)
    at lodash-3.10.1-min.js?v=5.5.0-SNAPSHOT:23
    at lodash-3.10.1-min.js?v=5.5.0-SNAPSHOT:25
    at Function.<anonymous> (lodash-3.10.1-min.js?v=5.5.0-SNAPSHOT:30)
    at Object.<anonymous> (IndividualRecordValidationView.js?v=5.5.0-SNAPSHOT:46)
    at Object.<anonymous> (jquery-2.1.1-min.js?v=5.5.0-SNAPSHOT:2)
    at j (jquery-2.1.1-min.js?v=5.5.0-SNAPSHOT:2)
    at Object.add [as done] (jquery-2.1.1-min.js?v=5.5.0-SNAPSHOT:2)
    at Array.<anonymous> (jquery-2.1.1-min.js?v=5.5.0-SNAPSHOT:2)
    at Function.each (jquery-2.1.1-min.js?v=5.5.0-SNAPSHOT:2)
  • In step 8, the section does not open.
  • In step 9, the view does not switch. All tabs stop responding.

GuyPaddock avatar Jun 30 '18 04:06 GuyPaddock