Knowledge Base Articles
Breadcrumbs

The currentUser() JQL function doesn't work in Structure

This article is for Structure Data Center.

Problem

In my structure, I want other users to only see issues assigned to them individually. When I use the currentUser() JQL function in a Filter generator, it doesn’t work properly, and all users only see issues assigned to me.

Solution

The currentUser() JQL function cannot work in generators as expected due to the architecture of the generators. Generators run from under the owner of the structure, and the owner always remains the same for consistency reasons. The currentUser() function requires changing the owner for every user viewing the structure, which is not possible.

However, the currentUser() function can be used in Filter transformations: these filters are applied on top of the content generated under the owner, removing the necessary issues. And since transformations are applied locally in the user’s browser, each user can see different results in the same structure without affecting what others see in it.

Here is how we recommend using such filtering:

  1. First, build the structure you need with the generators. For shared structures, we advise making the owner of the structure an admin or another user with the most access to issues in Jira.

  2. Add a JQL-based filter transformation with the currentUser() function, and save it.

  3. Either instruct each user to enable the saved filter in the structure when they open it, or enable the filter, and share the perspective link to the structure with the users via the Share button in the top-right corner. When a perspective link is created, it preserves the current state of the structure, including applied transformations in it. When users open this link, the filter transformation should already be enabled for them.

Please note: transformations are not available in Structure gadgets. To see work assigned to each user, you can consider adding a Group by Assignee generator to the displayed structure. This way, user can find their relevant issues by expanding their own group in the gadget.