Closed AnneEskildsen closed 6 months ago
@AnneEskildsen thanks for reporting this.
Thanks
Hi! I have heard from many volunteers, but here are those I am sure of: Andreas Bennetsen Boe, id 379572. Two whole transects missing: 'Læsten Bakker' and 'Assentoft Bakker' Hans Paarup Thomsen, id 376116. transect 'Forst botanisk have og travbanen i Aarhus' all sections were doubled. Helene Dalgaard Clausen, id 355171. Section 2 of transect 'Kærgårdsvej ved skydebanen' missing Anne Eskildsen, id 352089, Two whole transects missing: 'Løvbakke 1' and 'Løvbakke 2'. Heidi Buur Holbeck, id 349931. One transect missing: 'Ege Carpets' + app jumped randomly between sections in transects 'Rugmarken' and 'Granplantagen'
@johnvanbreda I think the issue here is that users can't see other users' locations, which we've talked about in the other thread. Regional coordinators might only need to see their own transects, but people can join other transects on the website, so this same issue applies. I am reverting the app to use the original report.
/reports/projects/ebms/ebms_app_sites_list.xml
To get all the attributes, you can use the locattrs parameter with a comma separated list of IDs, or just use the value "#all_survey_attrs" and supply an additional parameter survey_id=n where n is the survey to load all attributes for.
I'd like to retrieve all of these values. Does the locattrs
or the all_survey_attrs
allow this? Say to get the created_on
or parent_id
fields?
Hi Karolis! I hope I am not confusing you - I din't think this has anything to do with users seeing other users locations, but simply that people cannot see their own transects, or parts of them.
@AnneEskildsen I am looking at this particular site, Læsten Bakker which was created by Søgaard and is accessible to Andreas because he was invited. Is that how it was set up?
yes, that is correct. Of the transects I mentioned above, that are causing problems, some are shared between several volunteers, but not all. Shared ones are:
Thanks. Yeah, the sharing is broken at the moment, users can only see their own-created sites.
Ok, so that explains some of the problems! But probably not the issues of certain sections suddenly missing from some of the transects + the app jumping randomly between non-consecutive sections?
I think the issue here is that users can't see other users' locations, which we've talked about in the other thread. Regional coordinators might only need to see their own transects, but people can join other transects on the website, so this same issue applies. I am reverting the app to use the original report.
/reports/projects/ebms/ebms_app_sites_list.xml
To get all the attributes, you can use the locattrs parameter with a comma separated list of IDs, or just use the value "#all_survey_attrs" and supply an additional parameter survey_id=n where n is the survey to load all attributes for. I'd like to retrieve all of these values. Does the locattrs or the all_survey_attrs allow this? Say to get the created_on or parent_id fields?
Ah, the attributes I was referring to were the custom ones. Looking at the report, I see that that the main filter is based on you passing the Drupal user ID in a userID
parameter, so the report can then return locations that are linked to the user via their Drupal ID (as opposed to filtering to the locations the user created). If so then I think we could reproduce that filter in the REST API as it's not as bespoke as I originally thought.
As a quick fix, I can add created_on and parent_id to the report. Is that all you need right now @kazlauskis?
I pretty much use all of the default location model attributes, such as lat, long, geometries, etc. Can we pull these into the report?
We should also do the same to the ebms_app_sections_list.xml
report, as this is a combination of the two that were used before.
Ideally, if this is not too difficult, then enhancing the REST API to support the Drupal userID would be neater on my end. The API receives JWT tokens, which contain the CMS userID. Maybe the endpoint can return all of the locations that either the warehouse user OR the CMS user is linked to by default. Would that be feasible?
@kazlauskis you can try 2 new reports I've added - ebms_app_sites_list_2 and ebms_app_sections_list_2 which should have all the attributes.
@johnvanbreda thanks, I am getting a 500 error. I've tried with and without the website_id
param.
11:43:34 debug Constructing XMLReportReader for report /srv/sites/warehouse1.indicia.org.uk/modules/brc_reports/reports/projects/ebms/ebms_app_sites_list_2.xml.
11:43:34 error #44: Error in Rest API report request. There was an SQL error: ERROR: column l.website_id does not exist
LINE 20: WHERE (l.website_id in (118) or l.website_id is null)
@kazlauskis can you try again now?
@johnvanbreda Cool, that works well. Sorry, one tiny thing, can you rename the sref_system
to centroid_sref_system
? I can do that on my end, but changing this would then exactly match the REST locations API, and I can use the report as is.
@johnvanbreda the ebms_app_sections_list_2
report returns some sections multiple times, I understand it doesn't filter out the deleted ones. For example, site id=321060 returns the below response:
I've renamed sref_system to centroid_sref_system and filtered out deleted locations @kazlauskis.
@johnvanbreda thanks!
This is done now and will appear in the next app version, v1.26.2, once the app stores approve it.
Describe the issue
Many glitches with the app reported by volunteers, specifically:
Expected behaviour
expected: correct number of transects/sections visible in the app
To Reproduce
No response
App Version
v1.26.0 (346) (this is my app version, but problems reported from many different volunteers)
Device
Samsung Galaxy
When did this happen
20.-21. may
Screenshots
No response
Additional context
No response