BiologicalRecordsCentre / SPRING

Repository for tracking issues for the SPRING (EU Pollinator Monitoring) project
GNU General Public License v3.0
0 stars 0 forks source link

FITcount regional co-ordinator role #8

Closed DavidRoy closed 2 years ago

DavidRoy commented 2 years ago

linked to #6, we'll need:

@andrewvanbreda if this is best handled by Jim, let me know

andrewvanbreda commented 2 years ago

@DavidRoy I will do this, as there may be similarities to NPMS where users are assigned to squares and events (both of which are locations). Although in this case the difference would be that it is just one country.

andrewvanbreda commented 2 years ago

Note that the user country assignment to use now has its own issue #13 as I think it warrants that.

Only requirement needs completion for this issue (although there will be some overlap) "a Drupal regional co-ordinator role to enable download by country (e.g. using Country 2016 layer)"

andrewvanbreda commented 2 years ago

Note that we have had a meeting and it is only the "regional co-ordinator" role that needs a country assigned to them, so ignore the above comment.

Situation summary

This requirement is currently at the highest priority level.

andrewvanbreda commented 2 years ago

@DavidRoy Should the Regional Co-ordinators be able to see locations with full precision?, as on FIT Count data entry forms the data is blurred. I assumed yes they should, but need to check with you.

andrewvanbreda commented 2 years ago

@DavidRoy A couple of other questions

Again initially I am doing this as a modified version of UKPoMS report with a move to ElasticSearch when I am confident it can support all the equivalent functionality and I know how to implement them.

andrewvanbreda commented 2 years ago

@BirenRathod Hi Biren,

Whenever you get chance, could you pull these two reports onto the live Warehouse please. reports/projects/PoMS/regional_coodinator_download_grid.xml reports/projects/PoMS/regional_coodinator_download_map.xml Thanks

BirenRathod commented 2 years ago

@andrewvanbreda both pulled down on to live.

andrewvanbreda commented 2 years ago

@BirenRathod Thanks Biren

DavidRoy commented 2 years ago

@andrewvanbreda in answer:

@DavidRoy Should the Regional Co-ordinators be able to see locations with full precision?, as on FIT Count data entry forms the data is blurred. I assumed yes they should, but need to check with you. = yes

What surveys do we include? The My Records on UK PoMS allows the following 3 Public FIT Count 1km FIT Count FIT Count App This is also listed in a column on the report. = all these surveys to includ

Which countries are we going to use? Noting again the country is displayed as a column on the report, but also needs to go on the account page country selection field as well = all in the Countries 2016 list

andrewvanbreda commented 2 years ago

@DavidRoy Sorry slow to reply to this as was away at beginning of week. This is all ok, apart from perhaps the countries list is tricky as it was going to be a drop-down, but I see there are 258 entries. Will see if I can test this on my own box, see what it is like and come up with alternative if needed.

andrewvanbreda commented 2 years ago

HI @JimBacon Would you be able to get this data from the live warehouse please

select id || '|' || name from indicia.locations where location_type_id = 16516 and deleted=false order by name asc;

Email me if you don't think it should be posted onto public Github (or let me know if you can't, and I will ask John as Biren is away)

Cheers

JimBacon commented 2 years ago

"216197|Abyei" "215962|Afghanistan" "216212|Aksai Chin" "215965|Albania" "216021|Algeria" "215969|American Samoa" "215960|Andorra" "215967|Angola" "215964|Anguilla" "215976|Antarctica" "215963|Antigua and Barbuda" "215968|Argentina" "215966|Armenia" "215978|Aruba" "216213|Arunachal Pradesh" "215977|Australia" "215970|Austria" "215979|Azerbaijan" "215999|Bahamas" "215986|Bahrain" "215982|Bangladesh" "215981|Barbados" "216196|Bassas Da India" "215988|Belarus" "215983|Belgium" "215989|Belize" "215990|Benin" "215992|Bermuda" "215996|Bhutan" "216182|Bir Tawil (Disputed Territory)" "215994|Bolivia" "215995|Bonaire, Sint Eustatius and Saba" "215980|Bosnia and Herzegovina" "215971|Botswana" "215997|Bouvet Island" "215998|Brazil" "216080|British Indian Ocean Territory" "216204|British Virgin Islands" "215993|Brunei" "215985|Bulgaria" "215984|Burkina Faso" "215987|Burundi" "216059|Cambodia" "216019|Cameroon" "216000|Canada" "216014|Cape Verde" "216065|Cayman Islands" "216004|Central African Republic" "216168|Chad" "216001|Chile" "216006|China" "216214|China/India" "216016|Christmas Island" "216011|Clipperton Island" "216002|Cocos (Keeling) Islands" "216010|Colombia" "216061|Comoros" "215972|Congo" "215975|Cook Islands" "216012|Costa Rica" "215974|Côte D’Ivoire" "216036|Croatia" "216013|Cuba" "216015|Curaçao" "216017|Cyprus" "216018|Czechia" "216003|Democratic Republic of The Congo" "216022|Denmark" "216007|Djibouti" "216008|Dominica" "216009|Dominican Republic" "216026|Ecuador" "216028|Egypt" "216163|El Salvador" "216042|Equatorial Guinea" "216030|Eritrea" "216027|Estonia" "216166|Eswatini" "216032|Ethiopia" "216025|Falkland Islands" "216034|Faroes" "216024|Fiji" "216005|Finland" "216023|France" "216129|French Polynesia" "216151|French Southern and Antarctic Lands" "216047|Gabon" "216040|Gambia" "216049|Georgia" "216020|Germany" "216051|Ghana" "216052|Gibraltar" "216031|Greece" "216039|Greenland" "216048|Grenada" "216045|Guam" "216044|Guatemala" "216050|Guernsey" "216041|Guinea" "216046|Guinea-Bissau" "216053|Guyana" "216037|Haiti" "216215|Hala'Ib Triangle" "216055|Heard Island and Mcdonald Islands" "216056|Honduras" "216054|Hong Kong" "216038|Hungary" "216083|Iceland" "216216|Ilemi Triangle" "216081|India" "216076|Indonesia" "216087|Iran" "216082|Iraq" "216077|Ireland" "216079|Isle of Man" "216078|Israel" "216069|Italy" "216085|Jamaica" "216191|Jammu Kashmir" "216057|Japan" "216084|Jersey" "216086|Jordan" "216111|Kazakhstan" "216088|Kenya" "216060|Kiribati" "249206|Kosovo" "216192|Kuril Islands" "216064|Kuwait" "216058|Kyrgyzstan" "216074|Laos" "216094|Latvia" "216090|Lebanon" "216091|Lesotho" "216117|Liberia" "216095|Libya" "216071|Liechtenstein" "216092|Lithuania" "216093|Luxembourg" "216100|Macau" "216105|Madagascar" "216112|Malawi" "216132|Malaysia" "216110|Maldives" "216098|Mali" "216108|Malta" "216106|Marshall Islands" "216072|Mauritania" "216109|Mauritius" "216131|Mexico" "216033|Micronesia" "216103|Moldova" "216097|Monaco" "216099|Mongolia" "216104|Montenegro" "216075|Montserrat" "216096|Morocco" "216133|Mozambique" "216113|Myanmar/Burma" "216134|Namibia" "216067|Nauru" "216193|Navassa Island" "216066|Nepal" "216120|Netherlands" "216135|New Caledonia" "216127|New Zealand" "216119|Nicaragua" "216102|Niger" "216118|Nigeria" "216068|Niue" "216130|Norfolk Island" "216063|North Korea" "216107|North Macedonia" "216101|Northern Mariana Islands" "216114|Norway" "216089|Oman" "216138|Pakistan" "216123|Palau" "216143|Palestine" "216115|Panama" "216121|Papua New Guinea" "216210|Paracel Islands" "216124|Paraguay" "216128|Peru" "216137|Philippines" "216141|Pitcairn Islands" "216139|Poland" "216122|Portugal" "216142|Puerto Rico" "216125|Qatar" "216126|Romania" "216148|Russian Federation" "216149|Rwanda" "215991|Saint Barthélemy" "216174|Saint Helena, Ascension and Tristan Da Cunha" "216062|Saint Kitts and Nevis" "216070|Saint Lucia" "216140|Saint Pierre and Miquelon" "216202|Saint Vincent and The Grenadines" "216209|Samoa" "216178|San Marino" "216162|São Tomé and Príncipe" "216150|Saudi Arabia" "216194|Scarborough Reef" "216179|Senegal" "216195|Senkaku Islands" "216136|Serbia" "216169|Seychelles" "216177|Sierra Leone" "216173|Singapore" "216164|Sint-Maarten" "216176|Slovakia" "216175|Slovenia" "216170|Solomon Islands" "216158|Somalia" "216184|South Africa" "216043|South Georgia and The South Sandwich Islands" "216073|South Korea" "216161|South Sudan" "216035|Spain" "216211|Spratly Islands" "216116|Sri Lanka" "216171|Sudan" "216159|Suriname" "216160|Svalbard and Jan Mayen" "216172|Sweden" "215973|Switzerland" "216165|Syria" "216145|Tajikistan" "216144|Thailand" "216147|Timor-Leste" "216152|Togo" "216146|Tokelau" "216157|Tonga" "216180|Trinidad and Tobago" "216156|Tunisia" "216153|Turkey" "216155|Turkmenistan" "216167|Turks and Caicos Islands" "216181|Tuvalu" "216188|Uganda" "216187|Ukraine" "215961|United Arab Emirates" "216189|United Kingdom" "216154|United Republic of Tanzania" "216198|United States" "216190|United States Minor Outlying Islands" "216199|Uruguay" "216205|Us Virgin Islands" "216200|Uzbekistan" "216206|Vanuatu" "216201|Vatican City" "216203|Venezuela" "216208|Vietnam" "216207|Wallis and Futuna" "216029|Western Sahara" "216183|Yemen" "216185|Zambia" "216186|Zimbabwe"

andrewvanbreda commented 2 years ago

@JimBacon Thanks Jim BTW could you just have a peek in your junk email, as sent an email yesterday I am not sure you saw. Cheers.

andrewvanbreda commented 2 years ago

Hi @DavidRoy,

I have done a preliminary version of this on FIT Count (not in menu yet until you give your opinion)

It is here

https://fitcount.ceh.ac.uk/regional-coordinator-download

Download is same as UK PoMS My Records.

Only accessible to Regional Coordinators and admins.

Country is set via a drop-down on My Account pages. (This is a long drop-down, user can press key on their keyboard when drop-down selected to jump to countries beginning with that letter. Seems ok to me).

Country drop-down only selectable by administrator at moment, and only viewable by Regional Coordinator (I assume you don't want them setting it themselves. If you want to try it yourself, you can set a Country on your own account.

Once you are happy with this arrangement I will also put on EU PoMS

A couple of thoughts

  1. Currently if the country isn't selected, it returns data from all countries. I will change this to default to none before live. I only just noticed this.

  2. Another thought to consider. The system currently has a very literal view of the countries. So if UK is selected, it shows UK. So the assumption is that the "regions" for the regional coordinator match up with this. So for instance, the Channel Island data is separate to UK. I raise this as UK PoMS does include Channel Islands.

DavidRoy commented 2 years ago

This works well via admin login. I also tried for user (https://fitcount.ceh.ac.uk/user/67) by setting role as 'Regional co-ordinator' and selecting country = Sweden. But when masquerading as that use and going to https://fitcount.ceh.ac.uk/regional-coordinator-download I get an access denied message. Am I misunderstanding something @andrewvanbreda ?

andrewvanbreda commented 2 years ago

Hi @DavidRoy Thanks for letting me know about this issue. I have fixed this. There were 2 problems causing this in the permissions, I have corrected them.

Again, let me know if you have any further thoughts, and I will move this into final testing, then the live menu.

DavidRoy commented 2 years ago

Thanks @andrewvanbreda That works. Can you add a new menu item "Regional results" pointing to: https://fitcount.ceh.ac.uk/regional-coordinator-download. Only visible to users with role = Regional co-ordinator

andrewvanbreda commented 2 years ago

@DavidRoy Will do, I need to make one change to report before going live (no Country selection currently returns all data, should be none) I will let you know when live.

andrewvanbreda commented 2 years ago

@JimBacon Hi Jim,

In the absence of Biren would you be able to pull these two reports from indicia-reports onto live please? These are not used by any live page yet so this is safe. Just a slight alteration to stop all data returning if no country has been selected for regional coordinator.

/projects/PoMS/regional_coodinator_download_grid /projects/PoMS/regional_coodinator_download_map

Cheers

andrewvanbreda commented 2 years ago

Thanks Jim

@DavidRoy This is now live. I have checked it. Check you are happy and close if you are.

The things I checked include

DavidRoy commented 2 years ago

Thanks for implementing this