Knowledge Base Articles

How to change the Runs As user of generators in Structure

This article is for Structure Cloud.

Question

I want the Runs As user of generators in my structure to be changed to the user who is viewing the structure.

Answer

Generators run as the owner of the structure, and the owner always remains the same for consistency reasons. The Runs As user cannot be dynamic for the sake of performance and stability.

However, if you want to make the structure’s content flexible depending on who’s looking at it, you can achieve this by using a Filter transformation.

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 work items in Jira.

  2. Add a JQL-based filter transformation with the currentUser() function: assignee = currentUser() and save it. The filter will keep only the work items of the current user and remove the rest.

  3. 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.