data4development / IATI-data-validator

GNU Affero General Public License v3.0
5 stars 6 forks source link

Error message for missing recipient-region / recipient-country #56

Closed pelleaardema closed 4 years ago

pelleaardema commented 4 years ago

Testing NLRC data: https://test-validator.iatistandard.org/view/dqf/files/8751fde27f9f94e3dd42e5564fa7c53f

Error 3.7.1. - The activity should have recipient-country or recipient-region information for either the activity or for all transactions.

Though I agree with the fact that activities should have a recipient country or region, this is not mandated by the standard. Both recipient-country and recipient-region may occur any number of times.

The only guidance that contains must, is related to country/region at transaction level: "The country can also be specified at transaction rather than activity level. If recipient-country OR recipient-region are reported at the transaction level, ALL transactions MUST contain a recipient-country or recipient-region element and iati-activity/recipient-country and iati-activity/recipient-region MUST NOT be used."

Solution: This should be a warning, not an error

PetyaKangalova commented 4 years ago

@pelleaardema thank you for the feedback. I have flagged as bug so will be fixed.

There are a lot of rules in the standard once an country and/or region have been added, but you are correct that for this example this should be a warning.

amy-silcock commented 4 years ago

@Rolf I think this means we need to add in another test.

Having both recipient country/regions at activity AND transaction level is not allowed. There is no error that says The activity must not have recipient-country or recipient-region information at both activity and transaction level.

rolfkleef commented 4 years ago

@amy message 3.6.2 tests for this and says:

If the activity has recipient-country or recipient-region information, none of the transactions should have a recipient-country or recipient-region.

Perhaps that message has to be changed, can you add a new issue for that then?

amy-silcock commented 4 years ago

Thanks Rolf - will do! We'll aim to review the messages next week as this has highlighted some inconsistencies in how we've worded them.