WildAid / o-fish-android

Android app for the Officer's Fishery Information Sharing Hub (O-FISH). The mobile app allows fisheries officers to document and share critical information gathered during a routine vessel inspection.
Apache License 2.0
22 stars 24 forks source link

Previous 5 boardings not sorted properly #183

Closed o-fish-wildaid closed 4 years ago

o-fish-wildaid commented 4 years ago

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.

Sheeri commented 4 years ago

What I see on the screen: Screenshot_1595957032

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 commented 4 years ago

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.

lebedynskyi commented 4 years ago

Already done. Rechecked it. It was fixed in #195