I have this situation: I'm trying to loop through some issues, ordered by assignee, and when the assignee is different from the last issue, I want to make an entry in the audit log (eventually will want to send an email)
I do a lookupissues with order by assignee (but i'm not sure the oreder by is working based on my results)
I create a variable LastUser to be "No User Given"
Then I branch on {{lookupIssues}}
I audit log the LastUser variable (and in the log, it shows it only ONCE)
Then I do an if to see if the {{LastUser}} == {{LookedupIssue.Assignee.DisplayName}} and if it does, I I audit log the {{LastUser}} and the {{LookedupIssue.Assignee.DisplayName}}
Then I create a variable LastUser to be {{LookedupIssue.Assignee.DisplayName}} which will be used as the comparison to the assignee DisplayName in the next iteration of the loop to see if I have yet another user.
But based on what I'm seeing, the LastUser is being set, but reverts back to "No User Given" at the beginning of the loop.
This is what I see in the audit log for showing the Last User at the beginning of the loop:
"Last User to Start is "No User Given" +++++"
And I see that once... shouldn't I see it multiple times in the audit log? Once for each iteration?
Then this is what I see prior to my if statement comparing the Assignee to the LastUser:
"Cur User is "Je Che", not Last user who is "No User Given" *****, Cur User is "Zhi Zho", not Last user who is "No User Given" *****, Cur User is "Alec Murry", not Last user who is "No User Given" *****"
So that looks like when I set the LastUser at the end of the loop, it didn't hold, because after I set it, I save it to the audit log and it looks OK:
Last User is now: "Je Che" !!!!! , Last User is now: "Zhi Zho" !!!!! , Last User is now: "Alec Murry" !!!!!
What am I doing wrong here?
I've included the screenshots of my Rule
Starting at the top:

Then inside the If statement:
