I've created a user property called teamleader when I am maintain the jira username of the manager of each user.
Now, I JQL I want to find all issues for which the assignee has the current user's same teamleader so it essentially gets all issues that belong to the currentUser's team.
assignee in jiraUserPropertyEquals(teamleader, <teamleader username>)
just that instead of hardcoding the <teamleader username>, I would want that calculated based on the current user
something like
assignee in jiraUserPropertyEquals(teamleader, currentUserProperty(teamleader))
where currentUserProperty(teamleader) would return the currentUser teamleader property