Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

currentUser() broken in structure Edited

FYI

currentUser() seems to reference the user that created the structure not the user logged into the session looking at the structure.

One of my developers needed a structure to list issues she was watching. i created a folder and added a an insert JQL [ watcher = currentUser() ] this populates the structure with tickets I am watching when she uses the structure. We created a new structure with the same query from her machine and it brings in her watched issues.

Is this behavior as designer or is this a bug?

3 answers

I have the same problem

1. I created a structure with a filter as in the screenshot below (the assignee is set to currentUser())

2. I created a Dashboard with a gadget that references this structure; it works for me - I see the structure contents; however if another user opens the same dashboard, she sees not her contents but mine - this is the problem 

Any idea?

structure-currentUser.png

Hello Anar,

When it comes to structures, built automatically, generators that add issues always run from under the structure's owner, i.e. the currentUser() function can't work here as expected. If a generator's query is changed according to a user who is accessing a structure, it might cause some mix-ups - a structure itself might look differently for all users and some issues might be unavailable unintentionally. And if a structure is opened by several users at once, it would need to generate according to users' permissions and it might create additional strain on the performance.

For cases when a structure needs to be displayed differently for different users, transformations can be used - they are easy to apply and they only change the structure for a specific user in its browser window. So for structures, accessed by the majority of users, we would recommend to build them by a user with access to all of the needed issues and then to use transformations for additional filtering, grouping, etc. You can learn more about this feature in our documentation: https://wiki.almworks.com/display/structure/Using+Transformations

In your case, the Filter transformation by Assignee can be used after the structure is opened. For that please do the following:

1. Click the 'Automation' button to disable the Generators' editing mode (turning on or off of this button doesn't change anything in a structure).
2. Click the 'Transformations' button and then Add transformation on the appeared panel.
3. Select Filter | JQL Query... and type: assignee=currentUser().
4. Save that transformation and it will be available for all users to turn on (to access saved transformation, please click the 'Quick transformations' button).

I hope this helps! Please feel free to contact us directly at support.almworks.com if you need further assistance.

Best regards,
Stepan Kholodov
ALM Works

Hello Dan,

Our apologies for not answering you sooner, for some reason we didn't get a notification about your post. The currentUser() function can't work as expected when it comes to using it in generators - generators always run from under their structure's owner and this user stays the same regardless of who is accessing the structure. The function can be successfully used in the Filter transformation - then the structure will be first built from under its owner and then its content will be filtered out to display only issues that are assigned to a viewing user.

Please feel free to contact us at support.almworks.com if you need help with using transformations or if you have questions about anything; if you create a request, we'll get back to you shortly.

Best regards,
Stepan Kholodov
ALM Works

Hi, 

that´s not resolving the problem. 

What I want to achieve is: 

Every user can use the same structure to see all tasks assigned to him. I can´t put a generic structure in to select 80k+ tickets and then transform it. Seeing the performance of this, that´s totally ineffective...

 

Regards

Hello Björn,

As an alternative, you can try the following:

1. Open any structure and select the JQL option in the selector in the top left corner. This will switch to the JQL search mode instead of showing you any actual structures.
2. Type the same query as you have right now for the Insert generator but with the addition of the currentuser() function. This will show all issues of a current user that you want to be loaded in the structure.
3. Then, if you also have any hierarchy going on in the structure, you can recreate it in the JQL view as well by using transformations - Extend transformations for adding linked issues, Group transformations for grouping etc.
And once you recreate the structure you want to see there, you can click the Share button in the top right corner and send it to users so they could acces Structure using this link instead of opening the actual structure. The link will lead them to same view as you created in the JQL search, including applied transformations.

The idea here is to avoid creating an actual structure in the first place to also avoid the loading of a large number of issues before the filtering. Instead, a needed scope of issues is loaded in the search results and then additionally transformed to look like a structure. This workaround can be used by other users, they just need to access Structure using the perspective link.
JQL_perspective.jpg

I hope this helps. If this is not the fitting solution, please contact us directly at support.almworks.com and we'll be glad to look at your current structure and see what can be done to limit the initial loading of issues.

Best regards,
Stepan Kholodov
ALM Works

Hi,
sorry, nope this isn´t helping. I want to provide employees with a simple predefined list of their tasks, using structure. I don´t want everyone having to retype that JQL Query every day.
I suggest you provide an attribute that can be used in the JQL Insert that relates to the actual current user. I personally find it extremely misleading that the current user in this context is the owner of the structure. There´s gotta be a way to bypass that... as the owner isn´t necessarily the currentUser especially in cases where we want to provide simple structures for many users.
Kind regards

The described workaround only needs to be configured once by one user - when the Perspective link is created, it would only be required for other users to open it, and they will see issues that are assigned to them with all of the enabled transformations. The currentUser() function limitation is only related to generators, it works the same as expected in transformations and in the JQL search.

Your use-case absolutely makes sense and we definitely agree that the limitation can be inconvenient, but, unfortunately, it's not something that we can overcome simply and without changing the current architecture of Structure. But we're looking for ways of how this can be addressed in the future.

Right now only workarounds can be used. If you're looking for a different approach, we'll be glad to look into your set-up closely and come up with another solution that would apply, if possible. So please feel free to email directly to support@almworks.com and we'll get back to you shortly.

Best regards,
Stepan Kholodov
ALM Works

Hi,
I have a similar request. I would like to filter for issues assigned to the logged in user for a specific hierarchy level:
structure_currentUser.png

But this works only for me, becaus the filter runs only under my name. I would like to have the filter for each user. So, the filter should run under each user which is logged in and using the structure. Is this not possible?
In the result I would like to see only my PRJs, but all issues inside the PRJs. If there is another way, please let me know.

Hello Daniel,

The described can be done using a Filter transformation:

1. 1. Click the 'Automation' button.
2. Click the 'Transformations' button and then Add transformation on the appeared panel.
3. Select Filter | S-JQL Query... and type: selfordescendant of[assignee = currentUser() and type=prj] where prj is the PRJ issue type's name.
4. Save that transformation and it will be available for all users to turn on and for each user it will show only PRJs(and their sub-issues) assigned to them personally.

Best regards,
Stepan Kholodov
ALM Works

Hi Stepan,

Ok for structure it works. Thx. But only via transformation. It is not possible to filter all issues via "issue in structure(151)" because the transformation will not impact the result in the filter and the whole structure.

Regards

Daniel

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

280 views 8 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you