Once a group has been discovered as "modified" and reported on, should it always be listed as modified? Or, should it be back in "Unmodified" going forward? It will be easier to see future changes if it is reclassified back as “Unmodified since last report” - Thanks #16

Closed
Roger-at-GT opened this Issue Nov 1, 2016 · 9 comments

Projects

None yet

3 participants

@Roger-at-GT

No description provided.

@Roger-at-GT

Actually, this may be an issue with our environment, I have made some test changes and see them in the report as expected, but one particular group seems stuck in the modified section with no new changes and repeated report runs.

@cunninghamp cunninghamp added the question label Nov 2, 2016
@cunninghamp
Owner

The expected behavior is that it will report as modified once, and then next time if it hasn't been modified since the last report it should appear as unmodified.

That comparison relies on successfully writing the latest groups data back to an XML file on the file system. It may be that step is failing. Can you check whether that file has been updated next time the script runs?

@Roger-at-GT

It has been updating the XML file. Upon further testing it seems to be related to the group owner or specifically owners. The group that continuously shows up in the “Modified Groups found” section has 2 owners and when we remove one of them it behaves as expected and shows the change on the next report run and then shows as “Unmodified” on subsequent reports.

@cunninghamp
Owner

So if the group has two (or presumably anything more than one) owners, it will repeatedly and incorrectly be listed as Modified?

@Roger-at-GT

That is my experience so far, I will be able to test more later today.

@Roger-at-GT

Yes, when I remove all but one owner, the group goes to unmodified when you run the report two times after the change.

@cunninghamp
Owner

Thanks. We'll repro that and get a fix added.

@cunninghamp cunninghamp added bug and removed question labels Nov 4, 2016
@chrisbrownie chrisbrownie self-assigned this Nov 5, 2016
@chrisbrownie
Collaborator

Repro'd, working on a fix now.
image

@chrisbrownie chrisbrownie referenced this issue Nov 5, 2016
Merged

Fix issue 16 #18

@chrisbrownie
Collaborator
chrisbrownie commented Nov 5, 2016 edited

Hi @Roger-at-GT, this has been fixed. Groups will now report correctly when their manager attribute is either an array of multiple managers or is changed.

When there are multiple managers, a property of type ArrayList is returned. The script didn't handle comparing these properly. I've added some code now to compare objects of type ArrayList.

If you want to test the update, please try running the script from the development branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment