NaturalHistoryMuseum / scratchpads2

Scratchpads 2.0
http://scratchpads.org
GNU General Public License v2.0
199 stars 83 forks source link

Migrate fungi.myspecies.info - ordering terms in classification #3602

Closed informatics-dev closed 11 years ago

informatics-dev commented 11 years ago

Description:

Reported by maintainer:

The alphabetical arrangement within the All Fungi vocabulary continues to be problematic – see for example Hypogymnia (within Lecanorales/Parmeliaceae) – it is listed between Parmelia and Parmeliopsis. This seems to be an intermittent problem, and only visible on the web page. When you go in to edit the classification the genus already appears in the right place.

Attachments:

informatics-dev commented 11 years ago

Comment by Alice Heaton

The data in the database is correct (as shown by the query below), so this is not strictly a migration issue - it looks more like a bug in Scratchpads. I am looking into it now.

mysql> select d.tid, d.name, d.weight from taxonomy_term_data d inner join taxonomy_term_hierarchy h on d.tid = h.tid where h.parent = 3862 order by weight, name;
+------+---------------+--------+
| tid  | name          | weight |
+------+---------------+--------+
| 5184 | Alectoria     |      0 |
| 4364 | Bryoria       |      0 |
| 4472 | Cavernularia  |      0 |
| 4480 | Cetraria      |      0 |
| 5218 | Cetrariella   |      0 |
| 4649 | Cornicularia  |      0 |
| 5048 | Evernia       |      0 |
| 5058 | Flavocetraria |      0 |
| 3865 | Flavoparmelia |      0 |
| 6088 | Hypogymnia    |      0 |
| 4240 | Melanelia     |      0 |
| 4216 | Parmelia      |      0 |
| 3863 | Parmeliopsis  |      0 |
+------+---------------+--------+
13 rows in set (0.01 sec)
informatics-dev commented 11 years ago

Comment by Alice Heaton

This issue was fixed. As mentioned this was a Scratchpads bug, not a migration issue.

informatics-dev commented 11 years ago

Comment by Alice Heaton

Hi Alice, thank you for your help. The issue is fixed at the genus and species level as far as I can see, but still persists at subspecies level. Two problems I noticed were: Cladonia cervicornis subspp. cervicornis and verticillata, and Anaptychia ciliaris subspp. ciliaris and mamillata.

The issue with the slide show looks fine, thank you for sorting this out.

Best wishes

Paul

informatics-dev commented 11 years ago

Comment by Alice Heaton

Paul - I don't understand the problem. "Cladonia cervicornis subspp. cervicornis" is displayed before "Cladonia cervicornis subsp. verticillata", and "Anaptychia ciliaris subsp. ciliaris" is displayed before "Anaptychia ciliaris subsp. mamillata". Both of those are in alphabetical order - is that not what you expected ?

informatics-dev commented 11 years ago

Comment by Paul Cannon

It looks OK when you go in to edit the hierarchy, but not when you view the page in the main taxonomy (i.e. the external view of the site. See screenshot.

Best

Paul

informatics-dev commented 11 years ago

Comment by Alice Heaton

Ah, I see. I was looking under "Lichens" where the terms are ordered correctly.

informatics-dev commented 11 years ago

Comment by Alice Heaton

So this issue is caused by a different problem than the previous one. While "Anaptychia ciliaris subsp. mamilata" is displayed as such, in the database it's name was stored as "Anaptychia ciliaris" - which explains why it is displayed before 'ciliaris'.

Paul: I notice that on the old site, there isn't a corresponding "Anaptychia ciliaris subsp. ciliaris" term. Is that something you added later ? (That would explain why that one is stored with the correct name and the other one isn't).

informatics-dev commented 11 years ago

Comment by Paul Cannon

Yes, A. ciliaris subsp. ciliaris was added after migration. I did have some difficulty working out how to enter infraspecific taxa into the hierarchy (now sorted with help from Dimitris) so it's possible this is the result of user idiocy. But I haven't been able to fix the problem myself. I have noted that when you enter infraspecific taxa directly into the hierarchy, you don't see the infraspecific name after saving, even though the name appears correctly on the website view. This seems to be a general problem, hope my explanation is understandable.

informatics-dev commented 11 years ago

Comment by Alice Heaton

Paul: The problem is not your fault, the one you entered is correct, it's the one that was imported that is wrong. I'm going to write a script to fix the issue, as you've done work on that site I don't want to re-import it all.

informatics-dev commented 11 years ago

Comment by Alice Heaton

I've fixed the issue on this site. Paul can you confirm it's fixed ?

I still need to fix the importer for future sites (or we need to change the way Scratchpads generates the composite names, as currently that happens via javascript on the relevant form, and so doesn't happen when saved programatically).

informatics-dev commented 11 years ago

Comment by Paul Cannon

I'm glad it wasn't just me, though it probably makes more work for you... All seems OK now, thank you for your help. And I think you can close 2344 as well, that seems fixed nicely.

Hae a good weekend

Paul

informatics-dev commented 11 years ago

Comment by Alice Heaton

The importer now implements this properly.