Skip to content

Commit

Permalink
update changelog (#2949)
Browse files Browse the repository at this point in the history
* update changelog

* Remove feeds permissions & config. Update tests.

* Remove feeds function calls from dkan_datastore.module
  • Loading branch information
janette authored and dharizza committed Aug 26, 2019
1 parent 6b117a7 commit 7df9067
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 65 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ package-lock.json
.ahoy/docker-sync.yml
.docker-sync
.ahoy/docker-compose.proxyconf.yml
.vscode
7 changes: 6 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
7.x-1.16.14
7.x-1.17
-----------
- #2908 Add DKAN Periodic Updates module
- #2804 Disable and uninstall feeds, feeds_flatstore_processor, and feeds_field_fetcher modules
- #2945 Upgrade imagecache_actions to 1.11
- #2944 Specify behavior on dkan_workflow moderation set state action to avoid extra node_save.
- #2943 Add documentation for DKAN Feedback
- #2940 Update Open Data Schema Map to 7.x-2.4
- #2935 Add documentation for DKAN custom solr
- #2931 Add patch for NULL controller class
Expand Down
1 change: 0 additions & 1 deletion dkan.info
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ dependencies[] = double_field
dependencies[] = entity
dependencies[] = entity_token
dependencies[] = entityreference
dependencies[] = feeds
dependencies[] = facetapi
dependencies[] = facetapi_pretty_paths
dependencies[] = facetapi_bonus
Expand Down
1 change: 1 addition & 0 deletions dkan.install
Original file line number Diff line number Diff line change
Expand Up @@ -822,4 +822,5 @@ function dkan_update_7035() {
module_disable(array('feeds', 'feeds_field_fetcher', 'feeds_flatstore_processor'));
drupal_uninstall_modules(array('feeds', 'feeds_field_fetcher', 'feeds_flatstore_processor'));
}
node_access_rebuild();
}
6 changes: 0 additions & 6 deletions docs/releases/notes/1.16.14.md

This file was deleted.

26 changes: 26 additions & 0 deletions docs/releases/notes/1.17.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# DKAN 1.17 Release notes

## What's new

### DKAN Periodic Updates

The DKAN Periodic Updates module provides automated datastore updates on existing resources on a daily, weekly or monthly basis. If you have resources that change often and need the data to be re-imported to the datastore on a regular basis this feature is for you. It is included with DKAN core but will not be enabled by default. Consult the [documentation](https://dkan.readthedocs.io/en/latest/docs/components/periodic-updates.html) on how to set up and configure.

### Miscellaneous improvements

This release includes updates and bug fixes to DKAN Workflow, Open Data Schema Mapper, and accessibility compliance.

### The decommissioning of Feeds
The 7.x-1.16 release introduced a refactored DKAN Datastore that no longer relied the feeds module. In this release we are disabling feeds and its companion modules so that in the next release they can be completely removed.

> ⚠️ This release **disables** and **uninstalls** the feeds module. If you are using [feeds](https://drupal.org/project/feeds) on your site outside of the DKAN open data operations, be sure to backup your database and restore after upgrading or comment out the update hook dkan_update_7035.
- #2908 Add DKAN Periodic Updates module
- #2804 Disable and uninstall feeds, feeds_flatstore_processor, and feeds_field_fetcher modules
- #2945 Upgrade imagecache_actions to 1.11
- #2944 Specify behavior on dkan_workflow moderation set state action to avoid extra node_save.
- #2943 Add documentation for DKAN Feedback
- #2940 Update Open Data Schema Map to 7.x-2.4
- #2935 Add documentation for DKAN custom solr
- #2931 Add patch for NULL controller class
- #2921 Fix gaps in WCAG compliance
2 changes: 1 addition & 1 deletion docs/releases/notes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Release notes here will be identical to the releases kept in the `Github reposit
.. toctree::
:maxdepth: 1

1.16.14 <1.16.14>
1.17 <1.17>
1.16.13 <1.16.13>
1.16.12 <1.16.12>
1.16.11 <1.16.11>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,6 @@ function dkan_dataset_content_types_strongarm() {
'title' => array(
'weight' => '3',
),
'feeds' => array(
'weight' => '0',
),
'path' => array(
'weight' => '9',
),
Expand Down
11 changes: 0 additions & 11 deletions modules/dkan/dkan_datastore/dkan_datastore.module
Original file line number Diff line number Diff line change
Expand Up @@ -234,17 +234,6 @@ function dkan_datastore_node_update($node) {
$file = '';
}
}
if ($file) {
if (!isset($node->feeds)) {
// Feeds only saves if there is a form present. We want this to work
// programmatically as well.
feeds_node_prepare($node);
}
// Remove node from feeds list if not csv.
elseif ($file->filemime != 'text/csv') {
feeds_node_delete($node);
}
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ function dkan_permissions_default_roles_permissions() {
'administer status of own resource content' => TRUE,
'change layouts in place editing' => TRUE,
'change own username' => TRUE,
'clear dkan_file feeds' => TRUE,
'clear dkan_link feeds' => TRUE,
'create dataset content' => TRUE,
'create data_dashboard content' => TRUE,
'create dkan_data_story content' => TRUE,
Expand All @@ -82,11 +80,7 @@ function dkan_permissions_default_roles_permissions() {
'edit own data_dashboard content' => TRUE,
'edit own dkan_data_story content' => TRUE,
'edit own resource content' => TRUE,
'import dkan_file feeds' => TRUE,
'import dkan_link feeds' => TRUE,
'manage datastore' => TRUE,
'unlock dkan_file feeds' => TRUE,
'unlock dkan_link feeds' => TRUE,
'upload via file_resup' => TRUE,
'use gravatar' => TRUE,
'use manualcrop' => TRUE,
Expand Down Expand Up @@ -123,8 +117,6 @@ function dkan_permissions_default_roles_permissions() {
'administer taxonomy' => TRUE,
'change layouts in place editing' => TRUE,
'change own username' => TRUE,
'clear dkan_file feeds' => TRUE,
'clear dkan_link feeds' => TRUE,
'create dataset content' => TRUE,
'create data_dashboard content' => TRUE,
'create dkan_data_story content' => TRUE,
Expand Down Expand Up @@ -209,12 +201,8 @@ function dkan_permissions_default_roles_permissions() {
'edit own page content' => TRUE,
'edit own resource content' => TRUE,
'edit own video files' => TRUE,
'import dkan_file feeds' => TRUE,
'import dkan_link feeds' => TRUE,
'manage datastore' => TRUE,
'revert revisions' => TRUE,
'unlock dkan_file feeds' => TRUE,
'unlock dkan_link feeds' => TRUE,
'upload via file_resup' => TRUE,
'use gravatar' => TRUE,
'use ipe with page manager' => TRUE,
Expand Down Expand Up @@ -272,8 +260,6 @@ function dkan_permissions_default_roles_permissions() {
'bypass node access' => TRUE,
'change layouts in place editing' => TRUE,
'change own username' => TRUE,
'clear dkan_file feeds' => TRUE,
'clear dkan_link feeds' => TRUE,
'create dataset content' => TRUE,
'create data_dashboard content' => TRUE,
'create dkan_data_story content' => TRUE,
Expand Down Expand Up @@ -376,14 +362,10 @@ function dkan_permissions_default_roles_permissions() {
'edit own resource content' => TRUE,
'edit own video files' => TRUE,
'flush caches' => TRUE,
'import dkan_file feeds' => TRUE,
'import dkan_link feeds' => TRUE,
'manage datastore' => TRUE,
'manage datastore settings' => TRUE,
'notify of path changes' => TRUE,
'revert revisions' => TRUE,
'unlock dkan_file feeds' => TRUE,
'unlock dkan_link feeds' => TRUE,
'upload via file_resup' => TRUE,
'use gravatar' => TRUE,
'use ipe with page manager' => TRUE,
Expand Down
1 change: 0 additions & 1 deletion modules/dkan/dkan_sitewide/dkan_sitewide.module
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ function dkan_sitewide_update_status_alter(&$projects) {
$up_to_date_projects = array(
'gravatar',
'beautytips',
'feeds_field_fetcher',
'multistep',
'linkchecker',
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,13 @@ public function dropDatastores($scope) {
foreach ($result as $n) {
if (!empty($n->nid)) {
$node = node_load($n->nid);
$importer_ids = feeds_get_importer_ids($node->type);
foreach ($importer_ids as $importer_id) {
$source = feeds_source($importer_id, $node->nid);
$table_name = feeds_flatstore_processor_table_name($source->id, $source->feed_nid);
$has_file = dkan_datastore_file_field($node);
$wrapper = entity_metadata_wrapper('node', $node);
$status = ($has_file) ? DKAN_DATASTORE_FILE_EXISTS : DKAN_DATASTORE_EMPTY;
$wrapper->field_datastore_status->set($status);
$wrapper->save();
$this->dropTable($table_name);
}
$table_name = "dkan_datastore_" . $n->nid;
$has_file = dkan_datastore_file_field($node);
$wrapper = entity_metadata_wrapper('node', $node);
$status = ($has_file) ? 1 : 0;
$wrapper->field_datastore_status->set($status);
$wrapper->save();
$this->dropTable($table_name);
}
}
}
Expand Down Expand Up @@ -111,7 +107,7 @@ public function assertHasNoDatastoreRecords($title) {
$nid = $this->getNidByTitle($title);
$status = dkan_datastore_records($nid);
if (!empty($status)) {
throw new \Exception($title . ' has datastore records.');
throw new \Exception($title . ' has datastore records.');
}
}

Expand All @@ -122,7 +118,7 @@ public function assertHasDatastoreRecords($title) {
$nid = $this->getNidByTitle($title);
$status = dkan_datastore_records($nid);
if (empty($status)) {
throw new \Exception($title . ' has no datastore records.');
throw new \Exception($title . ' has no datastore records.');
}
}

Expand All @@ -140,10 +136,7 @@ public function resetDatastoreSettings($scope) {
* Drop a datastore table
*/
private function dropTable($table_name){
$table = data_get_table($table_name);
if($table) {
$table->drop();
} elseif (db_table_exists($table_name)) {
if (db_table_exists($table_name)) {
db_drop_table($table_name);
}
}
Expand Down
8 changes: 2 additions & 6 deletions test/phpunit/dkan_datastore/dkan_datastore.test
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ class DkanDatastoreWebTestCase extends DrupalWebTestCase {
$modules[] = 'dkan_datastore';
$modules[] = 'dkan_datastore_api';
$modules[] = 'features';
$modules[] = 'feeds';
$modules[] = 'feeds_field_fetcher';
$modules[] = 'feeds_flatstore_processor';
$modules[] = 'double_field';
$modules[] = 'entityreference';
$modules[] = 'field_group';
Expand Down Expand Up @@ -135,7 +132,6 @@ class DkanDatastoreWebTestCase extends DrupalWebTestCase {
'create resource content',
'edit any dataset content',
'edit any resource content',
'administer feeds',
'manage datastore',
);
$this->verbose('Creating admin user with permissions: ' . var_export($admin_perms, TRUE));
Expand Down Expand Up @@ -248,7 +244,7 @@ class DkanDatastoreWebTestCase extends DrupalWebTestCase {
protected function assertDatastoreTable($resource) {
// See if table exists.
$r = $this->assertTrue(
db_table_exists('feeds_datastore_dkan_file_' . $resource->nid),
db_table_exists('dkan_datastore_' . $resource->nid),
"Datastore table exists."
);
return $r;
Expand All @@ -269,7 +265,7 @@ class DkanDatastoreWebTestCase extends DrupalWebTestCase {
*/
protected function assertDatastoreTableData($resource, $id, $expected_result) {
// We're actually going to see if we get a hit for a particular country id.
$result = db_select('feeds_datastore_dkan_file_' . $resource->nid, 'f')
$result = db_select('dkan_datastore_' . $resource->nid, 'f')
->fields('f', array('country'))
->condition('id', $id)
->execute();
Expand Down

0 comments on commit 7df9067

Please sign in to comment.