Uploaded image for project: 'COmanage'
  1. COmanage
  2. CO-2387

OrgIdentitySource inconsistency for OrgIdentitySourceRecord

    XMLWordPrintable

Details

    Description

      The createOrgIdentity method of OrgIdentitySource includes this logic for creating a source record:

          // Create a Source Record
          $orgid['OrgIdentitySourceRecord'] = array(
            'org_identity_source_id' => $id,
            'sorid'                  => $sourceKey,
            'source_record'          => (!empty($brec['hash'])
                                         ? $brec['hash']
                                         : (isset($brec['raw'])
                                            ? $brec['raw']
                                            : null)),
            'last_update'            => date('Y-m-d H:i:s'),
            'co_petition_id'         => $coPetitionId
          );
      

      This can result in the field source_record being set to null under certain circumstances. But the null value will fail validation since the rule for the source_record field is 'notBlank'.

      The result is that the saveAssociated in createOrgIdentity() can fail.

      If the current value of null indicates that the source_record is allowed under certain circumstances to "not exist", then either a different value for the source_record should be used that will pass the current validation, or the validation rule should be loosened to permit the null.

      Attachments

        Issue Links

          Activity

            People

              benn.oshrin@at.internet2.edu Benn Oshrin (internet2.edu)
              scott.koranda@at.internet2.edu Scott Koranda (uwm.edu/illinois.edu)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: