IATI / ckanext-iati

CKAN extension for the IATI Registry
http://iatiregistry.org
9 stars 6 forks source link

Add validation to not allow dataset URL's that aren't an XML file #381

Open andreaszenasidi opened 2 years ago

andreaszenasidi commented 2 years ago

**WARNING: Needs to be deployed together with https://github.com/IATI/ckanext-iati/issues/365, https://github.com/IATI/ckanext-iati/issues/390 and https://github.com/IATI/ckanext-iati/issues/352**

As a publisher, I want to see a validation error when the URL to my IATI dataset is not pointing to an XML file so that I can't publish a dataset that is not in an XML format.

Acceptance criteria

  1. Functional Criteria 1.1. A logged in publisher who is trying to publish a new dataset when they enter a URL that is not pointing to an XML file should see the following validation error message "Incorrect file format. All files should be in XML format that follows the IATI Standard." image

1.2. A logged in publisher who is trying to update an existing dataset when they enter a URL that is not pointing to an XML file should see the following validation error message "Incorrect file format. All files should be in XML format that follows the IATI Standard."

cormachallinanderilinx commented 2 years ago

code is done waiting for the dependancy 352 to be finished before deploying

cormachallinanderilinx commented 1 year ago

Done and on staging (https://staging.iatiregistry.org/): Create or update a dataset Add a user to a file which is NOT .csv and it will not allow you to upload (when you click the upload button)

Example .csv (see blue arrow) image

Use a .csv file and upload will complete (unless there are errors in some of the other fields)

titiolukole commented 1 year ago

Approved! This can now go into Prod

robredpath commented 1 year ago

@cormachallinanderilinx did this get rolled out?

cormachallinanderilinx commented 1 year ago

@robredpath this was reverted because it was causing the Archiver to fail. See https://github.com/IATI/ckanext-iati/issues/400