Commit graph

6 commits

Author SHA1 Message Date
Bartosz Dziewoński c6cf4a26a4 Update expected IDs in ThreadItemStore tests
After MediaWiki change I308617427309815062d54c14f3438cab31b08a73
there's no longer a "default" user/page/revision in the database, so
the user/page/revision IDs in the tests should start at 1 and not 2.

Bug: T345984
Change-Id: I3271e4fdd52cf6e2074d8c9d3d5571a69b150476
2023-09-09 23:36:04 +02:00
Bartosz Dziewoński c4c455c550 ThreadItemStore: Update existing rows if possible rather than insert+delete
Bug: T321121
Change-Id: I678b093aef95febb33cf4b0140b0625ef3241779
2022-11-03 00:53:19 +01:00
Bartosz Dziewoński 66cac8523e ThreadItemStoreTest: Add test for old revisions of indistinguishable comments
Just to confirm that this works correctly, because I broke it a few
times in different ways while working on T321121.

In this scenario, discussiontools_item_revisions contains rows for
the oldest and newest revisions of pages containing each comment
distinguishable by name, as well as extra rows for the newest
revisions of comments indistinguishable by name, so that they can
be looked up by ID.

Change-Id: Ic8450a6b082ed343dd633d3a43c50696b5d6d2bb
2022-10-20 03:50:47 +02:00
Bartosz Dziewoński 33f4006713 ThreadItemStore: Fix updates for identical revision timestamps
Use revision IDs to break the tie, consistently with MediaWiki (see
RevisionStore::getRelativeRevision) instead of assuming that the
revision we're processing now is somehow both older *and* newer than
the other one (the mind boggles how that ever made sense to me).

Change-Id: I9f1a07124301a36be68578d908353b72f0442c00
2022-10-20 02:37:47 +02:00
Bartosz Dziewoński c922e1babd ThreadItemStoreTest: Add test for identical revision timestamps
discussiontools_item_pages row itp_id=5 has incorrect
itp_oldest_revision_id. It should point to the older of the two
revisions with the same time, but it points to the newer one.
discussiontools_item_revisions row is missing.

Depends-On: I56f0e161e5438d5f77b7d53d4db7411f90f97d05
Change-Id: I61ed42515891a84729455a7a32c98276c7cacd40
2022-10-20 02:36:40 +02:00
Bartosz Dziewoński 0024a94ba7 Store permalink data, implement Special:FindComment/GoToComment
Depends-On: I90656cc74bb1cb1f2f3c82ad51cfb164cb8a4a4b
Bug: T296801
Change-Id: I84187b303aa10a242c872088403f808df3d1f940
2022-08-11 01:19:47 +02:00