Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
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

JMWE roleMembers function

I use this snippet from my JMWE add-on to identify, by name, who is receiving an email notification on a certain event so folks know who has also been informed. I call this in a post function in a workflow. It works great and has for a couple years. I have some team members who have terminated employment with us. I detached them from the group called 'Production Support' that this function references before terminating their Atlassian Accounts. However, these terminated members (Bart and Lisa in my example below) are still returned in the list. It's not just these two users - anyone that previously worked with me who was in a group by this name is still identified in this emails. Is there an additional qualifier I can pass to this function to exclude inactive members? I couldn't spot one in the documentation. Thanks a lot for reading.

 

This notice was sent to:
<br/>
{{'Production Support' | roleMembers(true) | join(',')}}

 

Example output:

This notice was sent to:
Bart Simpson,Lisa Simpson,Tom Jones

 

Thanks,

-Paul

1 answer

0 votes

Hi @Paul Alexander 

you mentioned a Production Support group but the Nunjucks expression refers to a project role. Did you remove these users from the project role? If so, there is no reason why they would be returned by the roleMembers filter.

Sorry, David, I did state `groups` but I meant the `project role`. I double checked that the terminated members are not in this project role called 'Production Support'. In fact, the members are in no groups at all and no project roles at all. And all of the members are in an 'Account Disabled' state with no access to any of the products in my tenant. For ten years, we've used the approach to deactivate those who leave our organization instead of deleting their Atlassian account. Is this possibly why they'll continue to be attached to this project role? I just tested this integration again and still get these terminated members in the message.

You're a stellar member of this community, David, and I want to applaud you for a great product and always fast service and helpful advice;-). 

-Paul

@Paul Alexander ,

JMWE uses the official Jira REST API to retrieve the list of role members. The problem is that these users still belong to the project role in your project, even after being deactivated, but Jira is not showing them on the "People" tab because they are deactivated. And the Jira REST API that returns project role members doesn't return any indication that these users are disabled.

The only way to remove these users from the project roles is to reactivate them, remove them from project roles, and then deactivate them again.

Another solution is to use Jira's REST API to remove these users from the project roles: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-role-actors/#api-rest-api-2-project-projectidorkey-role-id-delete

I have reported the problem to Atlassian: https://ecosystem.atlassian.net/browse/ACJIRA-2342. But I don't expect a resolution anytime soon.

David, I reactivated the worker and still see that he does not belong to any groups or any project roles in any of my jira projects. I then deactivated him again but still he is included in the notification.

When doing a get request for roles in one of my projects I do get Lisa Simpson returned even though she is not attached to that role. Thanks for posting a bug for them though.

Paul,

after reactivating the user, you need to wait a little before going to the People page of your project. It takes a little time for Jira to synchronize with user management.

If it doesn't work, you should contact Atlassian support.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Confluence

⚡️NEW Group for Confluence Cloud Admins

Calling all Confluence Cloud Admins!  We created a new Community Group to support your unique needs as Confluence admins. This is a group where you can ask questions, access resou...

98 views 2 8
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