Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-4153

Inactive qualifiers cause problems on existing roles

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: KFS Release 4.0, 1.0.3
    • Component/s: Development
    • Labels:
      None
    • Similar issues:
      KULRICE-7263Passing Collections.emptyMap() as role qualifier causes failures in KIM
      KULRICE-12836Role qualifiers lost on role maintenance document
      KULRICE-7711Role qualifier validation being ignored when assigning a role as a member
      KULRICE-7571Entering an document type qualifier on a Role document causes stack trace on add
      KULRICE-4178Some role qualifiers displaying incorrectly
      KULRICE-7605Person and Role document broken when displaying data with role that has namespace qualifier
      KULRICE-8513Role document blows up if the attribute definition id of a qualifier contains a hyphen
      KULRICE-1470KIM Qualified Role with multiple qualifications
      KULRICE-6858If editing groups or roles, it validates the existence of all members before saving the doc, even those which are "inactive"
      KULRICE-9165Person document not displaying role qualifiers
    • Rice Module:
      KIM
    • Application Requirement:
      KFS

      Description

      You can't submit a role document listing an inactive org as a qualifying value for a user (such as KFS-SYS User or Accounting Reviewer). Inactivating the offending role doesn't help either. I wonder if we can either do some inactivation blocking on qualifying values based on their appearance on roles or handle inactive values differently if they're on pre-existing role members.

        Issue Links

          Activity

          Hide
          Jerry Neal (Inactive) added a comment -

          I think this might be coming from KimTypeServiceBase#validateAttributes:

          Map<String, List<String>> referenceCheckErrors = validateReferencesExistAndActive(kimType, attributes, validationErrors);
          for ( String attributeName : referenceCheckErrors.keySet() ) {
          List<String> attributeErrors = referenceCheckErrors.get(attributeName);
          for ( String err : attributeErrors )

          { validationErrors.put(attributeName, err); }

          }

          Show
          Jerry Neal (Inactive) added a comment - I think this might be coming from KimTypeServiceBase#validateAttributes: Map<String, List<String>> referenceCheckErrors = validateReferencesExistAndActive(kimType, attributes, validationErrors); for ( String attributeName : referenceCheckErrors.keySet() ) { List<String> attributeErrors = referenceCheckErrors.get(attributeName); for ( String err : attributeErrors ) { validationErrors.put(attributeName, err); } }
          Hide
          Eric Westfall added a comment -

          Setting this to blocker priority, because it is one of the 3 remaining issues for KFS 4.0.

          Show
          Eric Westfall added a comment - Setting this to blocker priority, because it is one of the 3 remaining issues for KFS 4.0.
          Hide
          Garey Taylor added a comment -

          Adding Emerson's and Jerry's comments:

          Hi Jerry,
          Dan Lemus told me that you were the original reported on this issue. Is there a scenario that you are using or would use in one of the KFS instances to test out a solution for this issue?
          Thanks,
          -emerson

          -----------------------------------------------------------------

          Hi Emerson,

          I think you could test using any role that takes org as a qualifier, for example KFS-SYS Organization Reviewer. Find any org that is used as a qualifier for one of the role assignments, then inactivate using the Org maintenance doc, then go back and try to edit the role assignment with that qualifier. It should at least allow you to inactive the role assignment.

          Does that help?

          Jerry

          Show
          Garey Taylor added a comment - Adding Emerson's and Jerry's comments: Hi Jerry, Dan Lemus told me that you were the original reported on this issue. Is there a scenario that you are using or would use in one of the KFS instances to test out a solution for this issue? Thanks, -emerson ----------------------------------------------------------------- Hi Emerson, I think you could test using any role that takes org as a qualifier, for example KFS-SYS Organization Reviewer. Find any org that is used as a qualifier for one of the role assignments, then inactivate using the Org maintenance doc, then go back and try to edit the role assignment with that qualifier. It should at least allow you to inactive the role assignment. Does that help? Jerry
          Hide
          Emerson David (Inactive) added a comment - - edited

          Solution is two-fold:
          1) Find changes between the role members prior to submission with those upon submission
          2) Validate only those being changed

          This needs to happen either in IdentityManagementRoleDocumentRule.processCustomSaveDocumentBusinessRules() or IdentityManagementRoleDocumentRule.validateRoleQualifier().

          Show
          Emerson David (Inactive) added a comment - - edited Solution is two-fold: 1) Find changes between the role members prior to submission with those upon submission 2) Validate only those being changed This needs to happen either in IdentityManagementRoleDocumentRule.processCustomSaveDocumentBusinessRules() or IdentityManagementRoleDocumentRule.validateRoleQualifier().
          Hide
          Emerson David (Inactive) added a comment -

          I changed up the solution a little bit. What we're going to do will follow this logic:
          1) If a member is active on a Role on a Document, and they have an inactive Role Qualifier, Role Qualifier validation will fail
          2) If a member is inactive on a Role on a Document, and they have an inactive Role Qualifier, Role Qualifier validation will pass

          To that end, I created an Active Role Member Helper that will gather all members on a Role and return only the active members. Those active members are passed to the Role Qualifier validation (validateRoleQualifier). For all other validations, all members will still be passed in.

          Show
          Emerson David (Inactive) added a comment - I changed up the solution a little bit. What we're going to do will follow this logic: 1) If a member is active on a Role on a Document, and they have an inactive Role Qualifier, Role Qualifier validation will fail 2) If a member is inactive on a Role on a Document, and they have an inactive Role Qualifier, Role Qualifier validation will pass To that end, I created an Active Role Member Helper that will gather all members on a Role and return only the active members. Those active members are passed to the Role Qualifier validation (validateRoleQualifier). For all other validations, all members will still be passed in.
          Hide
          Emerson David (Inactive) added a comment -

          Test scenario to be used in KFS CNV or REG instance:
          Log in as "kggodfre"
          1) Go to Administration -> Role
          2) Find Role Name Organization Reviewer "org*rev*"
          3) Edit - Description: Add bomiddle to role

          • Add member "bomiddle"
          • Name: bomiddle
          • Chart code: BA- Bloomington AUX
          • Org code: INAC
          • Document Type Name: ACCT
          • click add
          • Set Action Type Code to APPROVE
          • Set Action Policy Code to FIRST
            4) Submit

          5) Go to Main Menu -> Organization Lookup
          6) Find an active org like INAC
          7) Edit

          • Description Deactivate INAC
          • Organization End Date: today's date
          • Active Indicator: uncheck
            8) Blanket Approve

          9) Go to Administration -> Role
          10) Find Role Name Organization Reviewer org*rev*
          11) Edit
          12) Description: Remove bomiddle from role
          13) Set member bomiddle's Active To Dt to today
          14) Submit

          Document is submitted and bomiddle no longer is assigned to Role Organization Reviewer

          Show
          Emerson David (Inactive) added a comment - Test scenario to be used in KFS CNV or REG instance: Log in as "kggodfre" 1) Go to Administration -> Role 2) Find Role Name Organization Reviewer "org*rev*" 3) Edit - Description: Add bomiddle to role Add member "bomiddle" Name: bomiddle Chart code: BA- Bloomington AUX Org code: INAC Document Type Name: ACCT click add Set Action Type Code to APPROVE Set Action Policy Code to FIRST 4) Submit 5) Go to Main Menu -> Organization Lookup 6) Find an active org like INAC 7) Edit Description Deactivate INAC Organization End Date: today's date Active Indicator: uncheck 8) Blanket Approve 9) Go to Administration -> Role 10) Find Role Name Organization Reviewer org*rev* 11) Edit 12) Description: Remove bomiddle from role 13) Set member bomiddle's Active To Dt to today 14) Submit Document is submitted and bomiddle no longer is assigned to Role Organization Reviewer
          Hide
          Emerson David (Inactive) added a comment -

          Dan, please refresh the Rice build in the KFS-CNV instance and test.

          Show
          Emerson David (Inactive) added a comment - Dan, please refresh the Rice build in the KFS-CNV instance and test.

            People

            • Assignee:
              Emerson David (Inactive)
              Reporter:
              Dan Lemus (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 days
                2d
                Remaining:
                Remaining Estimate - 2 days
                2d
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Structure Helper Panel