Codes marked for deletion do not appear in the Publication
It was reported that for example JOAQB was marked with a X for release 2025-1 under UN rules this would be kept in the directory for 2 releases and the removed.
Currently our publication download (https://unlocode.unece.org/publications) does not include this code as it is marked for deletion BUT it is shown on the webpage for that country https://unlocode.unece.org/directory/locodes?country=JO
This example does have the date as 0701 when it should have been 2501 the date of marking for deletion.
Reviewing the code pipeline supports why this is happeneing
- A tagged publish with --tag-release already strips X from the published artefacts for that very release — so the manual's "edition N shows the X, edition N+1 is gone" semantic is not what this pipeline does by default. By default a tagged release publishes without the X rows.
The two releases was documented and in the past UN have published twice a year, meaning that the code should remain for a time period of 1 year. There is intention to maybe now publish more often (up to 4 times per year) was indicated meaning the notice period for deleted codes would be shortened to 6 months.
The intention here was to retain for 1 year, we will need to rely upon the date part of the data being updated for this to be effective,
This ticket should handle a couple of points to resolve:
-
Show UNLOCODES marked with X until physically removed from locodes -
Implement a pipeline that ensures when a code is updated the date field is automatically updated (delete add or change) ensuring that in this case if the date is not updated by the maintainer it is automatically done. -
Date removal script on release if there are X in the locodesdirectory that over over 1 year (YYMMM) then remove them from locoed and then publish to respect the rules.