This article is for Structure Cloud.
Problem
In my structure, I want other users to only see work items 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 work items 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: such filters are applied on top of the content generated from under the owner, resulting in necessary work items being removed. 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:
-
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 work items in Jira.
-
Add a JQL-based filter transformation with the currentUser() function, and save it.
-
Either instruct each user to enable the saved filter in the structure when they open it, or enable the filter, and share the link to the structure with the users via the ‘Copy link’ option in the ‘Share & permissions’ section (the button is located in the top-left corner of the structure). When such links are created, they preserve 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 items by expanding their own group in the gadget.