---
title: "Use a workflow validator based on logged hours"
canonical: "https://support.appfire.com/space/PSJ/15482880/Use%20a%20workflow%20validator%20based%20on%20logged%20hours"
format: markdown
---
> Macro (aura-html)


 

```
interval max = "60m";
interval w = getTimeSpent(key, "jira-users");

string errorMsg = "You must have minutes worked on the issues but must be less than 60";

if(isNull(w) || w > max) {
    return false, "error", errorMsg;
}
```

[Transition based on a tempo](https://community.atlassian.com/t5/Marketplace-Apps-questions/Transition-based-on-a-tempo/qaq-p/654062#M37657)

[I want that users can't assign an issue without entering the work log](https://community.atlassian.com/t5/Jira-questions/I-want-that-users-can-t-assign-an-issue-without-entering-the/qaq-p/668211#M220062)