Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-2305

"Stem stemOwner" is repeated in export to gsh

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Stem ownerStem = StemFinder.findByName(grouperSession, "testC:testCfolder", false);
      if (ownerStem == null) { gshTotalErrorCount++; System.out.println("Error: cant find stem: testC:testCfolder"); problemWithAttributeAssign = true; }
      attributeAssignSave.assignOwnerStem(ownerStem);
      attributeAssignSave.assignPutAttributeAssignIdsToNotUseSet(true);
      gshTotalObjectCount += 1;
      if (!problemWithAttributeAssign) { AttributeAssign attributeAssign = attributeAssignSave.save(); if (attributeAssignSave.getChangesCount() > 0)

      { gshTotalChangeCount+=attributeAssignSave.getChangesCount(); System.out.println("Made " + attributeAssignSave.getChangesCount() + " changes for attribute assign: " + attributeAssign.toString()); }

      }
      problemWithAttributeAssign = false;
      attributeAssignSave = new AttributeAssignSave(grouperSession).assignAttributeAssignIdsToNotUse(attributeAssignIdsAlreadyUsed).assignPrintChangesToSystemOut(true);
      attributeAssignSave.assignAttributeAssignType(AttributeAssignType.stem);
      attributeDefName = AttributeDefNameFinder.findByName("testC:attrDef1name", false);
      if (attributeDefName == null) { gshTotalErrorCount++; System.out.println("Error: cant find attributeDefName: testC:attrDef1name"); problemWithAttributeAssign = true; }
      attributeAssignSave.assignAttributeDefName(attributeDefName);
      Stem ownerStem = StemFinder.findByName(grouperSession, "testC:testCfolder", false);
      if (ownerStem == null) { gshTotalErrorCount++; System.out.println("Error: cant find stem: testC:testCfolder"); problemWithAttributeAssign = true; }
      attributeAssignSave.assignOwnerStem(ownerStem);
      attributeAssignSave.assignPutAttributeAssignIdsToNotUseSet(true);
      gshTotalObjectCount += 1;
      if (!problemWithAttributeAssign) { AttributeAssign attributeAssign = attributeAssignSave.save(); if (attributeAssignSave.getChangesCount() > 0)

      { gshTotalChangeCount+=attributeAssignSave.getChangesCount(); System.out.println("Made " + attributeAssignSave.getChangesCount() + " changes for attribute assign: " + attributeAssign.toString()); }

      }
      problemWithAttributeAssign = false;
      attributeAssignSave = new AttributeAssignSave(grouperSession).assignAttributeAssignIdsToNotUse(attributeAssignIdsAlreadyUsed).assignPrintChangesToSystemOut(true);
      attributeAssignSave.assignAttributeAssignType(AttributeAssignType.group);
      attributeDefName = AttributeDefNameFinder.findByName("testC:attrDef1name", false);

      Attachments

        Activity

          People

            chad.redman@at.internet2.edu Chad Redman (unc.edu)
            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Smart Checklist