Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App summary of timed count doesn't match data in the database #719

Open
johnvanbreda opened this issue Aug 30, 2024 · 5 comments
Open

App summary of timed count doesn't match data in the database #719

johnvanbreda opened this issue Aug 30, 2024 · 5 comments
Assignees
Labels
app issues related to mobile applications

Comments

@johnvanbreda
Copy link
Collaborator

Raised by a user. They have provided a screenshot of the details of the details held in the app for a 15 minute timed count. All the details match the raw data held on the warehouse except for 1 taxon, which shows a single record on the app summary, but 8 records in the warehouse. The records have different external keys and different sample entered_sref values so are not duplicates.

@kazlauskis I'll email the details over for when you get round to this as I'm not sure if the taxa are supposed to be sensitive.

@johnvanbreda johnvanbreda added the app issues related to mobile applications label Aug 30, 2024
@CrisSevilleja
Copy link
Collaborator

CrisSevilleja commented Sep 2, 2024

I have exactly that problem, I think it is related to sensitive species and sensitive surveys. I did two 15-minute counts on the 15th of August including a sensitive species (Phengaris nausithous) and marked them as a sensitive survey. I submitted those surveys as shown in my app uploaded surveys.
IMG_2467

When I check on the website, they don't appear on my samples page either on the downloads of samples.
Captura de pantalla 2024-09-02 121545

Other users reported to me similar situation before I went on holiday. I can give more details of other users having this issue.

@CrisSevilleja
Copy link
Collaborator

issue related to sensitive species #691

@kazlauskis
Copy link
Member

kazlauskis commented Sep 4, 2024

@johnvanbreda, the app uses ES to fetch user samples. The ES doesn't return me some of those 8 subsamples belonging to the 26995658 sample. Any thoughts on why?

E.g. running the below es-samples query is OK:

{
    "size": 10000,
    "query": {
        "bool": {
            "must": [
                {
                    "match": {
                        "id": "26995680"
                    }
                }
            ]
        }
    }
}

but this one doesn't:

{
    "size": 10000,
    "query": {
        "bool": {
            "must": [
                {
                    "match": {
                        "id": "26995666"
                    }
                }
            ]
        }
    }
}

@johnvanbreda
Copy link
Collaborator Author

@kazlauskis using es-samples, it will apply default filtering and sensitivity blurring etc. Can you try the same query, but add this to the JWT payload: "scope": "userWithinWebsite"

That tells the system that the user is looking at just their own data, so allows full precision data.

@kazlauskis
Copy link
Member

@johnvanbreda the JWT is created by the identity manager, i.e. Drupal, where the scopes=roles. I could create a role, or modify some Drupal module to include this extra scope to app users, but I wonder if there is an easier way here, like a request header or a param that I could change in the client (app or website) on the fly. A client with a single user authentication connection may want to run global and sometimes user-specific queries, so it is good to have some way to do that without changing the JWT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app issues related to mobile applications
Projects
None yet
Development

No branches or pull requests

3 participants