Skip to content

AO3-7120 Change user troubleshooting to also reindex user in admin user search#5484

Open
Cubostar wants to merge 3 commits intootwcode:masterfrom
Cubostar:AO3-7120
Open

AO3-7120 Change user troubleshooting to also reindex user in admin user search#5484
Cubostar wants to merge 3 commits intootwcode:masterfrom
Cubostar:AO3-7120

Conversation

@Cubostar
Copy link
Contributor

Pull Request Checklist

Issue

https://otwarchive.atlassian.net/browse/AO3-7120

Purpose

This PR makes the Troubleshoot button in the admin user also reindex the user.

Credit

Cubostar, he/him

Copy link
Collaborator

@sarken sarken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue mentions this will rely on automated testing, not manual, so I'm going to mark this as Action Needed until automated tests are added.

@Bilka2
Copy link
Contributor

Bilka2 commented Dec 5, 2025

Please also update the "To fix common errors with this user's Subscriptions and Stats pages..." note on the user administration page to mention the admin user search

Copy link
Contributor

@Bilka2 Bilka2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I said in my previous comment, please update the troubleshooting help text on the admin user page. It should say

To fix common errors with this user's Subscriptions and Stats pages, and to reindex the user and their works and bookmarks, choose "Troubleshoot."

@user.set_user_work_dates
@user.reindex_user_creations
@user.update_works_index_timestamp!
@user.reindex_document
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please call enqueue_to_index instead, we don't need to do this reindexing synchronously and it matches what reindex_user_creations does. you can then check that it was queued with add_to_reindex_queue in the rspec test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants