Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1156 validate temporal #3003

Merged
merged 5 commits into from Jan 7, 2020
Merged

1156 validate temporal #3003

merged 5 commits into from Jan 7, 2020

Conversation

janette
Copy link
Member

@janette janette commented Jan 3, 2020

User story

As a data publisher I want to be alerted when the temporal value is not valid.

$d1 = '2000-01-15T00:45:00Z'; //valid
$d2 = '2000-01-01T01:00:00+1200'; //valid
$d3 = '1988-12'; //valid
$d4 = '01/01/2015-12/31/2019'; //not valid
$d5 = '2007- present'; //not valid
$d6 = '2000-01-15T00:45:00Z/2010-01-15T00:06:00Z'; //valid
$d7 = '2000-01-15T00:45:00Z/P1W'; //valid

How to reproduce

Harvest from https://data.chhs.ca.gov/data.json

Errors

see https://github.com/NuCivic/healthdata/issues/1156

Error: Call to a member function getTimestamp() on null in DatajsonHarvestMigration->prepareRow() (line 207 of ..../dkan/modules/dkan/dkan_harvest/modules/dkan_harvest_datajson/dkan_harvest_datajson.migrate.inc)

Behavior

Now when harvesting any temporal value that is not valid will NOT be included in the dataset, that "field" will be empty, and an error message will be logged in the harvest error dashboard.

Reminders

  • There is test for the issue.
  • Coding standards checked.
  • Review docs.getdkan.com (or in /docs) to see if it still covers the scope of the PR and update if needed.

@dharizza dharizza merged commit 796b153 into 7.x-1.x Jan 7, 2020
@dharizza dharizza deleted the 1156-validate-temporal branch January 7, 2020 21:39
dafeder pushed a commit that referenced this pull request Apr 24, 2020
* wip

* wip

* wip

* wip

* Test for invalid temporal dates.

Co-authored-by: Dharizza Espinach B. <dharizza@gmail.com>
dafeder pushed a commit that referenced this pull request Apr 24, 2020
* wip

* wip

* wip

* wip

* Test for invalid temporal dates.

Co-authored-by: Dharizza Espinach B. <dharizza@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants