Closed o-fish-wildaid closed 4 years ago
What I see on the screen (ios is the same even though this is an android screenshot):
From the database (the query limits the timestamp so there aren't ALL the records shown): MongoDB Enterprise atlas-l4abbo-shard-0:PRIMARY> db.BoardingReports.aggregate([{$match: { agency:'Ecuadorian Galapagos', timestamp: {$gt : ISODate("2020-07-25 00:00:00.000Z")} }}, {$sort: { timestamp: -1 }}, {$project: { 'vessel.name': 1, timestamp: 1, _id: 0 }}]); { "timestamp" : ISODate("2020-07-28T17:17:43.407Z"), "vessel" : { "name" : "Orca" } } { "timestamp" : ISODate("2020-07-28T17:16:56.318Z"), "vessel" : { "name" : "Predator" } } { "timestamp" : ISODate("2020-07-28T17:16:22.183Z"), "vessel" : { "name" : "Magic" } } { "timestamp" : ISODate("2020-07-28T16:55:34.351Z"), "vessel" : { "name" : "Location Test" } } { "timestamp" : ISODate("2020-07-28T16:21:17.338Z"), "vessel" : { "name" : "Location Test" } } { "timestamp" : ISODate("2020-07-28T16:19:35.063Z"), "vessel" : { "name" : "Location Test" } } { "timestamp" : ISODate("2020-07-28T14:11:02.583Z"), "vessel" : { "name" : "Location Test" } } { "timestamp" : ISODate("2020-07-28T09:04:12.183Z"), "vessel" : { "name" : "TestVessel" } } { "timestamp" : ISODate("2020-07-27T14:27:32.455Z"), "vessel" : { "name" : "Jenny" } } { "timestamp" : ISODate("2020-07-27T14:23:28.354Z"), "vessel" : { "name" : "Jenny" } } { "timestamp" : ISODate("2020-07-27T12:21:27.275Z"), "vessel" : { "name" : "Location Test" } } { "timestamp" : ISODate("2020-07-27T12:20:05.059Z"), "vessel" : { "name" : "Location Test" } } { "timestamp" : ISODate("2020-07-27T12:03:34.775Z"), "vessel" : { "name" : "Jenny" } } { "timestamp" : ISODate("2020-07-27T11:43:04.691Z"), "vessel" : { "name" : "Jenny" } }
@Sheeri it happens, because "Orca" and "Predator" both don't have permit number (or have the same - empty).
Bob from WildAid says. "Most records will have permit number, but we should not hide records without them."
Please show boardings with permit numbers. It is OK if boardings with the same vessel name and blank permit number (e.g. "test" and blank permit number) are grouped as the same vessel.
@Sheeri, for now it works in the same way. If vessel has permit number, we use permit number as unique identifier and group vessels by permit number. If vessel don't have permit number, we use name of the vessel as a unique identifier and group this vessel by name.
Confirmed this works as you say. Closing!
When I look at the recent boardings I can see the following vessels: Orca - Magic - Location Test - TestVessel - Jenny. But in the database the most recent boardings are Orca - Predator - Magic - Location Test - TestVessel.