Steps to replicate the issue (include links if applicable):
Access conversion metric data at https://api.wikibase.cloud/wikiConversionData
What happens?:
The last_edited_time for socioinsight.wikibase.cloud is listed as 2023-10-03 07:27:28
What should have happened instead?:
The most recent edit for socioinsight.wikibase.cloud should have been 2023-10-12T02:08:20Z
https://socioinsight.wikibase.cloud/w/api.php?action=query&list=recentchanges&format=json
and observe an edit with the timestamp of 2023-10-12T02:08:20Z
Other information (browser name/version, screenshots, etc.):
This appears to happen because there are multiple wikiLifeCycleEvents for socioinsight.wikibase.cloud. The conversion metric controller returns the first of these
See the tinker session below:
> Wiki::where(['domain' => 'socioinsight.wikibase.cloud'])->first()->wikiLifecycleEvents()->get()
= Illuminate\Database\Eloquent\Collection {#7641
all: [
App\WikiLifecycleEvents {#7643
+id: 600,
+created_at: "2023-10-03 19:06:31",
+updated_at: "2023-10-03 19:06:31",
first_edited: "2023-10-03 06:56:06",
last_edited: "2023-10-03 07:27:28",
+wiki_id: 657,
},
App\WikiLifecycleEvents {#7277
+id: 615,
+created_at: "2023-10-04 19:06:36",
+updated_at: "2023-10-04 19:06:36",
first_edited: "2023-10-03 06:56:06",
last_edited: "2023-10-04 08:21:04",
+wiki_id: 657,
},
App\WikiLifecycleEvents {#7524
+id: 695,
+created_at: "2023-10-10 19:04:02",
+updated_at: "2023-10-10 19:04:02",
first_edited: "2023-10-03 06:56:06",
last_edited: "2023-10-10 01:09:06",
+wiki_id: 657,
},
App\WikiLifecycleEvents {#7546
+id: 726,
+created_at: "2023-10-12 19:05:04",
+updated_at: "2023-10-12 19:05:04",
first_edited: "2023-10-03 06:56:06",
last_edited: "2023-10-12 02:08:20",
+wiki_id: 657,
},
],
}This is surprising because we are using the updateOrCreate method so I would have expected us to only have one