I've made a post-function on a workflow transition to send an email notification. I need to include the last comment but only if the reporter (to whom I am sending this notification) has permission to see it.
I have found this class
which has a function to do exactly that I believe
hasBrowsePermission(User user, Comment comment)
but trying to get in in the groovy template gives errors. The constructor requires a load of other elements (and going further recursively) and I haven't found a way to get this object in the template.
This said, I have two questions:
Thanks a lot, it's a real blocker.
Update: which comment does actually get the reporter? I look at a preview with lastComment for one issue and it automatically skips the last comment if it is internal and gives me last public. On a different issue it gives me last even if internal. If by chance the preview content depends on who's previewing, what does then go to the user?
Resolved. It is enough to get a list of all the comments on a particular issue that the user is allowed to see
If you have a comment, get its ID and check if it's among the IDs of the comments in the list above.
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in talking to 20 people planning t...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs