mysociety / alaveteli

Provide a Freedom of Information request system for your jurisdiction
https://alaveteli.org
Other
389 stars 195 forks source link

Consider whether or not public body tags should be case sensitive #5307

Open mdeuk opened 5 years ago

mdeuk commented 5 years ago

Originally posted by @RichardTaylor in https://github.com/mysociety/whatdotheyknow-theme/pull/582#issuecomment-512237474 #582

We have a more general issue with tags being case sensitive and admins sometimes introducing something inconsistent eg. at the time of writing we have 8 public bodies tagged

https://www.whatdotheyknow.com/body?tag=Scotland and 540 tagged https://www.whatdotheyknow.com/body?tag=scotland

Should we enforce lower case on tags?

garethrees commented 5 years ago

Moved to https://github.com/mysociety/alaveteli as we'd make this change for all Alavetelis.

I think enforcing lower case would be easiest. We could ignore case on comparison, but that would be quite a faff in the code I think.

mdeuk commented 5 years ago

Moved to https://github.com/mysociety/alaveteli as we'd make this change for all Alavetelis.

I think enforcing lower case would be easiest. We could ignore case on comparison, but that would be quite a faff in the code I think.

This would seem to make sense. On WDTK we only have a couple of tags which are specifically in another case (three that come to mind are CRC, LEP, and, RFCAs); others are a byproduct of what could perhaps be considered a stylistic preference.

Provided enforcement wouldn't cause a specific issues with existing bodies, I can't see any issue in this approach. 🙂

RichardTaylor commented 3 years ago

If tags ever appear to the public then proper capitalisation of eg. Scotland would be preferable.

RichardTaylor commented 3 years ago

If tags ever appear to the public then proper capitalisation of eg. Scotland would be preferable.

Tags don't currently appear to the public I don't think. Only categories do (tags where a description of what the tag is for exists), so we only show the properly capitalised. If tags are kept largely behind the scenes then maybe all lowercase is OK.

RichardTaylor commented 3 years ago

The Scotland / scotland issue in the initial issue description here has already been fixed.

We could propose a developer action to make all existing tags lowercase, then enforce lowercase from now on?

RichardTaylor commented 2 years ago

In the case of key:value tags there might be values which have elements which should be uppercase.

It might be safer to leave such values mixed case?

eg. a company number "SC327000" - is it important the SC is capitalised?

What about an NHS ODS code eg. YGMXK

I don't think in either of those cases we'd break anything by going lowercase, but we might lose something, as the codes are capitalised on the official registers.

mdeuk commented 2 years ago

In the case of key:value tags there might be values which have elements which should be uppercase. ... I don't think in either of those cases we'd break anything by going lowercase, but we might lose something, as the codes are capitalised on the official registers.

Agreed - some of the datasources we use may very well be case sensitive, so it makes sense that the 'value' string honours whichever format the source uses.

There are some surprising examples of database query systems which are case sensitive, both in and out of public sector!

garethrees commented 2 years ago

The National Archives convert to lowercase.

Review your tags. Please be aware that tags will be saved and displayed in lowercase letters to maintain standardisation and consistency.