---
title: "Assign issues to the previous assignee"
canonical: "https://support.appfire.com/space/PSJ/15480450/Assign%20issues%20to%20the%20previous%20assignee"
format: markdown
---
> Macro (aura-html)


## Assign an issue to the previous assignee

```
string [] testers = usersInRole("TEST", "Product Development Tester");
assignee = testers[0];
```

## Post function

```
string [] h = fieldHistory(key, "assignee");
string a;

if(isNotNull(h[1])) {
    a = h[1];
}
else {
    a = h[3];
}

assignee = a;
```