Most jobs are shown in forum.example.com/sidekiq/scheduler. For example if you changed a badge query, you could wait a day for the BadgeGrant job to run, or you could hurry it along by hitting the Trigger button manually. I don’t know which of those jobs updates the flairs though.
We haven’t updated yet to the latest commit as there are no changes present to fix this bug.
In our case, user flairs remain unchanged when we update groups via Discourse Connect SSO. We see the user is no present in the group, but flair remains.
Wow. Well I don’t know the estimates. Based on our data flows, there may be dozens & hundreds of users leaving/joining specific groups via SSO each day.
Anyway I can count users with outdated (unlinked to groups) flairs?
And how does one even edit other users flairs? I couldn’t find such option in admin panel. Not saying that I’m gonna update so many users one by one to remove this bug’s legacy.
By the way, removing flair from group settings and uploading another flair image doesn’t help. Users out of this group still keep the group flair
Just checking if someone knows what to do with this problem
Sorry to bump this post so many times, but this bug is really messing up with our community @vinothkannans do you have any suggestions on how to proceed with it’s effects for us?
Thank you for replying.
Do I understand correctly, that due to the effects of this bug, we should perform queries like these on daily or other frequency basis? The thing is that our users group are being updated daily + every time the user’s subscription status changes on the main website. Everything done via SSO.
Thanks, I will patiently wait for your investigation results before turning to rails queries.
Please let me know if I may be any help to you on this issue
@kinetiksoft below rails code should fix the issue for all the members in every group. It will remove the group flair from users if they don’t belong to that flair group anymore.
Note, you don’t need to run this script regularly. It is a one-time fix for those old affected users. Take a backup as a precaution before running it.
User.joins("LEFT OUTER JOIN group_users ON group_users.user_id = users.id AND group_users.group_id = users.flair_group_id").where(group_users: { id: nil }).where.not(flair_group_id: nil).update_all(flair_group_id: nil)
Thank you! I will let you know once we run the query & will give some updates within upcoming days to see if there is no inconsistency with flairs to groups relations after that
Great, sure, will take a look into upcoming commits in upgrade section.
Should we wait with SQL query from above or we can proceed with it without waiting for commit to be merged in our discourse instance?