ckanext-scheming icon indicating copy to clipboard operation
ckanext-scheming copied to clipboard

Config setting to add custom composite separator

Open fostermh opened this issue 4 years ago • 6 comments

While working with scheming, spatial, harvester, composite, and repeating extensions I noticed that the default separator of '-' for composite fields caused some problems. This was mostly due to the default field names in the spatial extension containing the same character. I had previously forked the composite extension and added a config setting to set the separator used on composite fields to a custom character.

Now that scheming supports this functionality directly I suggest adding a config setting to allow users to set the separator character to something other than a dash if needed. This pull request addresses this suggestion.

To use a custom separator character, add the scheming.composite.separator setting to your ckan.ini file.

Fix #294

fostermh avatar Aug 26 '21 18:08 fostermh

I'm testing it with the spatial plugin, and apart few changes (check comments in pull req), it looks working.

ccancellieri avatar Nov 01 '21 14:11 ccancellieri

Hi so in short it's a very good Idea, I'm testing on my iso19115 and looks a good improvement.

I've still a problem on subfields of type multifield.

That button was not working due to an issue with the new character on the js.

image

I'll send a pull req to you so you can integrate in this pull req.

ccancellieri avatar Nov 01 '21 18:11 ccancellieri

here is it, just a supereasy fix to the js and a line in the documentation:

https://github.com/cioos-siooc/ckanext-scheming/pull/2

ccancellieri avatar Nov 01 '21 18:11 ccancellieri

ok, I merged in your pull request. thanks for adding the README update. It seems the 2.9 tests are failing but I can't seem to get the tests to run locally. not sure what the issue is there.

fostermh avatar Nov 01 '21 20:11 fostermh

I'm checking the error and it looks unrelated [#310], although I'm aligning the tests to better reflect the usage of the separator.

This patch looks good (tested, worked) and it's very useful when spatial is involved so thank you!

ccancellieri avatar Nov 02 '21 15:11 ccancellieri

ok great. I think this is good to go then. Not sure who should review next and/or merge?

fostermh avatar Dec 02 '21 20:12 fostermh