edina / fieldtrip-cobweb-project

A cobweb theme for fieldtrip app
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Records from public editors are created with the .edtr suffix in the editor name #89

Closed rgamez closed 9 years ago

rgamez commented 9 years ago

In localStorage the public editors are stored with the editor suffix this name is used in the record creation, note that the private editors are stored correctly and create correct records.

{
    "public": {
        "87adfea4-a691-4449-b824-2f31f7f3f845.edtr": {
            "class": "annotate-custom-form",
            "group": "public",
            "type": "87adfea4-a691-4449-b824-2f31f7f3f845.edtr",
            "bbox": [
                ""
            ],
            "recordGeometry": "point",
            "title": "Lakes and Lagøøns"
        },
        "82fbb8a0-9dcc-4047-9482-95d8215bb7f5.edtr": {
            "class": "annotate-custom-form",
            "group": "public",
            "type": "82fbb8a0-9dcc-4047-9482-95d8215bb7f5.edtr",
            "bbox": [
                ""
            ],
            "recordGeometry": "point",
            "title": "Mystery Species Survey - PNP - 18 July"
        }
    },
    "private": {
        "946c93c0-4442-4bc3-a7ea-b607da12b4b8": {
            "class": "annotate-custom-form",
            "group": "private",
            "type": "946c93c0-4442-4bc3-a7ea-b607da12b4b8",
            "bbox": [
                ""
            ],
            "recordGeometry": "point",
            "title": "OBT Beach Comber"
        },
        "4af22f2a-0a02-4aad-957a-d6370456ab00": {
            "class": "annotate-custom-form",
            "group": "private",
            "type": "4af22f2a-0a02-4aad-957a-d6370456ab00",
            "bbox": [
                ""
            ],
            "recordGeometry": "point",
            "title": "OBT Invasive Species"
        }
    }
}
xmichael commented 9 years ago

FYI this is a duplicate of #75 which could not be reproduced on the mobile side. Please fix on FTOpen side if possible.

I suspect the discrepancy is because when FTOpen searches for all public editors it uses the /editors/ PCAPI call to fetch all editor filenames (with edtr extention). On the flip side, when FTOpen searches for private editors it uses the /surveys/ PCAPI call which returns surveys (without the edtr extension).