You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Context: We have a JSW project for change management. There are two fields this depends on: Approvers (for assigning the appropriate approvers) and Approved By (for capturing the name of who provided approval on a transition). A validator ensures that only individuals in the Approvers field can select the Approve transition. A Scriptrunner post function then copies the user's name to the Approved By field and a comment is added to the ticket for date/time stamp purposes. This is the solution we created in order to capture multiple approvals in a JSW project. Both the Approvers and Approved By are multi-user fields.
Problem: I created a filter that the Approvers can use to see which issues are awaiting their approval:
project = ITCM AND status in ("Awaiting CAB Approval", "Emergency Approval") AND Approvers = currentUser() AND "Approved By" != currentUser()
I received reports that sometimes this filter works as expected and other times it does not. If I remove the "Approved By" != currentUsers() portion of the filter, the results always work appropriately. But users need to be able to easily see which items they have not yet approved.
Any suggestions are greatly appreciated. Thank you!
Since Approvers and Approved by are multi-user fields you might want to try:
Approvers in (currentUser()) AND "Approved By" in (currentUser())
Can you see if this fixes it?
I meant his (typo):
Approvers in (currentUser()) AND "Approved By" not in (currentUser())
But you probably caught that?
I did catch the typo! This still didn't work though.
It's weird, because if I remove either the
Approver = currentUser()
Approved By != currentUser()
the query works. And I received reports that sometimes users do see issues with the full query but we can't figure out why it works for some issues but not others.
That changes it off course :-). "For some issues but not for others", that usually means a permission issue. Have you ever tried the Permissions helper?
First determine for a user an issue that he sees with the query and one that he doesn't, but should. The go to permission helper, fill out the user and the issue and you will see whether there is a permission blocking. It's the Browse projects permission you're after: