Page MenuHomePhabricator

Suggested Investigations: Show link to checkuser log if target has been checked before
Closed, ResolvedPublic

Description

Summary

Initial feedback from users of CheckUser-SuggestedInvestigations suggest that a link to previous checks on an account is useful.

Background

  • Feedback has said that checkusers want to be able to see if accounts listed in CheckUser-SuggestedInvestigations have been checked before
    • If they have been checked before, it will be useful to quickly visit a page that shows those checks
  • Initial designs for this call for a link to Special:CheckUserLog that is filtered to checks on that user only
    • If the user has never been checked before, then we should hide the link which will save on space and indicate that no checks have occurred on that account

User story

As a checkuser:

  • Look at an open CheckUser-SuggestedInvestigations case and want to see if the accounts listed in the case have been investigated before
  • I look at the username and want to see this information without clicking to another page
    • Currently, I have to open their contributions and then click on user checks to see this information

Acceptance criteria

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1214482 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] [WIP] SI: Add "past checks" link next to accounts in table pager

https://gerrit.wikimedia.org/r/1214482

Change #1214482 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] SI: Add "past checks" link next to accounts in table pager

https://gerrit.wikimedia.org/r/1214482

test status: QA PASS

When a past check on the user has not been performed there will be no past check link

Should there be a previous check, there will be a past check link and will take you to the check user log

Dreamy_Jazz added a subscriber: kostajh.

Errors on testwiki suggest that we used the wrong DB connection (found by @kostajh):

[9f026a77-900e-44ed-9f9d-6518b96f1a91] /wiki/Special:SuggestedInvestigations Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading or after adding a new extension?

Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Upgrading and https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:How_to_debug for more information.

Error 1146: Table 'testwiki.cu_log' doesn't exist
Function: MediaWiki\CheckUser\SuggestedInvestigations\Pagers\SuggestedInvestigationsCasesPager::formatUsersCell
Query: SELECT 1 FROM `cu_log` WHERE cul_target_id = 71778 LIMIT 1

Backtrace:

from /srv/mediawiki/php-1.46.0-wmf.7/includes/libs/Rdbms/Database/Database.php(1227)
#0 /srv/mediawiki/php-1.46.0-wmf.7/includes/libs/Rdbms/Database/Database.php(1211): Wikimedia\Rdbms\Database->getQueryException(string, int, string, string)
#1 /srv/mediawiki/php-1.46.0-wmf.7/includes/libs/Rdbms/Database/Database.php(1185): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, int, string, string)
#2 /srv/mediawiki/php-1.46.0-wmf.7/includes/libs/Rdbms/Database/Database.php(642): Wikimedia\Rdbms\Database->reportQueryError(string, int, string, string, bool)
#3 /srv/mediawiki/php-1.46.0-wmf.7/includes/libs/Rdbms/Database/Database.php(1365): Wikimedia\Rdbms\Database->query(Wikimedia\Rdbms\Query, string)
#4 /srv/mediawiki/php-1.46.0-wmf.7/includes/libs/Rdbms/Database/Database.php(1314): Wikimedia\Rdbms\Database->select(array, string, array, string, array, array)
#5 /srv/mediawiki/php-1.46.0-wmf.7/includes/libs/Rdbms/Database/DBConnRef.php(128): Wikimedia\Rdbms\Database->selectField(array, string, array, string, array, array)
#6 /srv/mediawiki/php-1.46.0-wmf.7/includes/libs/Rdbms/Database/DBConnRef.php(370): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#7 /srv/mediawiki/php-1.46.0-wmf.7/includes/libs/Rdbms/QueryBuilder/SelectQueryBuilder.php(779): Wikimedia\Rdbms\DBConnRef->selectField(array, string, array, string, array, array)
#8 /srv/mediawiki/php-1.46.0-wmf.7/extensions/CheckUser/src/SuggestedInvestigations/Pagers/SuggestedInvestigationsCasesPager.php(205): Wikimedia\Rdbms\SelectQueryBuilder->fetchField()
#9 /srv/mediawiki/php-1.46.0-wmf.7/extensions/CheckUser/src/SuggestedInvestigations/Pagers/SuggestedInvestigationsCasesPager.php(124): MediaWiki\CheckUser\SuggestedInvestigations\Pagers\SuggestedInvestigationsCasesPager->formatUsersCell(array)
#10 /srv/mediawiki/php-1.46.0-wmf.7/includes/Pager/TablePager.php(175): MediaWiki\CheckUser\SuggestedInvestigations\Pagers\SuggestedInvestigationsCasesPager->formatValue(string, array)
#11 /srv/mediawiki/php-1.46.0-wmf.7/includes/Pager/IndexPager.php(581): MediaWiki\Pager\TablePager->formatRow(stdClass)
#12 /srv/mediawiki/php-1.46.0-wmf.7/includes/Pager/IndexPager.php(618): MediaWiki\Pager\IndexPager->getRow(stdClass)
#13 /srv/mediawiki/php-1.46.0-wmf.7/includes/Pager/CodexTablePager.php(60): MediaWiki\Pager\IndexPager->getBody()
#14 /srv/mediawiki/php-1.46.0-wmf.7/extensions/CheckUser/src/SuggestedInvestigations/Pagers/SuggestedInvestigationsCasesPager.php(570): MediaWiki\Pager\CodexTablePager->getFullOutput()
#15 /srv/mediawiki/php-1.46.0-wmf.7/extensions/CheckUser/src/SuggestedInvestigations/SpecialSuggestedInvestigations.php(95): MediaWiki\CheckUser\SuggestedInvestigations\Pagers\SuggestedInvestigationsCasesPager->getFullOutput()
#16 /srv/mediawiki/php-1.46.0-wmf.7/includes/SpecialPage/SpecialPage.php(711): MediaWiki\CheckUser\SuggestedInvestigations\SpecialSuggestedInvestigations->execute(null)
#17 /srv/mediawiki/php-1.46.0-wmf.7/includes/SpecialPage/SpecialPageFactory.php(1744): MediaWiki\SpecialPage\SpecialPage->run(null)
#18 /srv/mediawiki/php-1.46.0-wmf.7/includes/Actions/ActionEntryPoint.php(504): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
#19 /srv/mediawiki/php-1.46.0-wmf.7/includes/Actions/ActionEntryPoint.php(144): MediaWiki\Actions\ActionEntryPoint->performRequest()
#20 /srv/mediawiki/php-1.46.0-wmf.7/includes/MediaWikiEntryPoint.php(181): MediaWiki\Actions\ActionEntryPoint->execute()
#21 /srv/mediawiki/php-1.46.0-wmf.7/index.php(44): MediaWiki\MediaWikiEntryPoint->run()
#22 /srv/mediawiki/w/index.php(3): require(string)
#23 {main}

Change #1218746 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Follow-up: SI: Add "past checks" link next to accounts in table pager

https://gerrit.wikimedia.org/r/1218746

Change #1218747 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@wmf/1.46.0-wmf.7] Follow-up: SI: Add "past checks" link next to accounts in table pager

https://gerrit.wikimedia.org/r/1218747

Change #1218747 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@wmf/1.46.0-wmf.7] Follow-up: SI: Add "past checks" link next to accounts in table pager

https://gerrit.wikimedia.org/r/1218747

Mentioned in SAL (#wikimedia-operations) [2025-12-16T12:27:47Z] <dreamyjazz@deploy2002> Started scap sync-world: Backport for [[gerrit:1218747|Follow-up: SI: Add "past checks" link next to accounts in table pager (T411268)]]

Mentioned in SAL (#wikimedia-operations) [2025-12-16T12:31:49Z] <dreamyjazz@deploy2002> dreamyjazz: Backport for [[gerrit:1218747|Follow-up: SI: Add "past checks" link next to accounts in table pager (T411268)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Change #1218746 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Follow-up: SI: Add "past checks" link next to accounts in table pager

https://gerrit.wikimedia.org/r/1218746

Mentioned in SAL (#wikimedia-operations) [2025-12-16T12:38:35Z] <dreamyjazz@deploy2002> Finished scap sync-world: Backport for [[gerrit:1218747|Follow-up: SI: Add "past checks" link next to accounts in table pager (T411268)]] (duration: 10m 47s)