Skip to content

Commit

Permalink
Group-Demo: Group type consolidation (#2700)
Browse files Browse the repository at this point in the history
* PGOV-276 POC: Copy Program into Bureau

* PGOV-276 Migrate Program into Bureau/Office. Turn off group sync on Displayed In

* Mark bureau/office in default page

* PGOV-1033 Migration of Advisory Group

* Update drush command to migrate Project. Update Twig.

* Update group search result twig. Update revision time stamp

* Update teaser display

* Configure the Base Group type

* Update custom code for Base Group

* Update search index and twig

* Update base group twig

* Allow the migrate_group command to resume

* Fix group name bug in drush command

* Add command to delete groups

* Iterate the usage array to update all fields

* Comment out test code

* Output field updates

* Update message format

* Replace referenced group and add unset()

* Migrate a single group

* Migrate group one by one

* Don't print usage migaration details

* Truncate more group path. Add usage migrate output.

* Show base groups in block visibility settings

* Update views before deleting advisory_group

* Prepare views to allow group deletion

* Update shell script

* Fix migrate group Drush command and script

* Update media field on group. Update views to include base group.

* Remove time command

* Fix name of field_certified_advisory_body

* Add missing field Neighborhood

* Update My Grouops view

* Add combined group type filter to My Groups

* Update view admin_groups

* Migrate rabbit hole related field values.

* Update views: group_child_group, group_geo_map, groups_updated_recently

* Update view manage_group_subgroups

* Use state variable portland.skip_group_sync in portland_groups.module

* Migrate field_bureau of Council Document

* Fix admin_groups, projects_indx, sitewide_groups_index views

* Copy group member and content

* Patch group module

* Delete group content

* Reduce group_content batch count

* Fix group roles

* Track Media usage as source.

* Fix media revision

* Comment out lines in migrate_group

* Migrate redirects (legacy path)

* Fix error in setRedirect

* Update Group Creator permissions

* Add "terminus self:plugin:reload"

* Fix build error

* Remove portland:create_group_types

* Update conditional fields for Base Group

* Update Group Type term ID after syncing with Live

* Add the Service Area field

* Update composer.lock after merging

* Remove field_migration_status after merging

* Update composer.lock after merging

* Update Base Group display configs

* Try to update search_api_solr

* Update group type filter in the view "Groups by Term"

* Config translation for Base Group

* Fix group test

* Update translation config for Base Group

* Update composer.lock after merging

* Restore stopwords_und and synonyms_und

* Remove "Base group: " from group full template

* Turn on maintenance mode in the migrate_group script

* Update the group type filter in the view "views.view.displayed_in.yml : entity_reference_council_document_department" to migra

* Turn on Twig debugging to debug base group full display

* Turn off Twig debugging and fix base group templates for fields in Project

* Remove debugging text in Bureau/office twig

* Update admin-group test

* Revert group role tag ID in ally.js. Will update the test after group migration.

* Update tag ID for group admin fields section title.

* Fix text in admin-group.js test

* Add unset in group migration

* Add GC

* Add more unset() statements

* Add migration steps

* Small fixes to group migration output

* Fix permission on Group Subtype field

* Increase Base Group title length to 60 characters

* Revert search_api_solr to 4.3.3 to match Dev

* Disable breadcrumbs based on Site Menu. Add custom breadcrumbs in easy_breadcrumb

* Use custom code to alter breadcrumb for Park Facilities

* Patch easy_breadcrumb to get link to Home

* Disable menu_breadcrumb

* Filter HTML on rendered_item. Update easy_breadcrumb custom path.
  • Loading branch information
kxwang authored Sep 19, 2024
1 parent 8c287ae commit 2465e1b
Show file tree
Hide file tree
Showing 361 changed files with 15,772 additions and 3,881 deletions.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ build_and_deploy: &build_and_deploy
# Don't check the repo host key
export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
terminus self:plugin:reload
if [[ $CIRCLE_USERNAME = "" ]]; then
# Set CIRCLE_USERNAME for builds triggered by GitHub actions
echo 'export CIRCLE_USERNAME="BTS eGov"' >> $BASH_ENV && source $BASH_ENV
Expand Down
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"drupal/crop": "^2.1",
"drupal/csv_serialization": "^4.0",
"drupal/ctools": "^3.7",
"drupal/custom_add_another": "^2.0",
"drupal/custom_add_another": "^2.1",
"drupal/datalayer": "^2.0",
"drupal/devel": "^5.1",
"drupal/diff": "^1.0",
Expand Down Expand Up @@ -146,7 +146,7 @@
"drupal/search_api_location": "^1.0@alpha",
"drupal/search_api_page": "^1.0",
"drupal/search_api_pantheon": "^8.0",
"drupal/search_api_solr": "^4.3.0",
"drupal/search_api_solr": "4.3.3",
"drupal/seckit": "^2.0",
"drupal/select2": "^1.13",
"drupal/sendgrid_integration": "^2.0",
Expand Down Expand Up @@ -261,6 +261,9 @@
"drupal/bootstrap_datepicker": {
"POWR-904/854/1017 - Submodule for exposed filter with custom identifier": "patches/powr-904-bootstrap-datepicker.patch"
},
"drupal/easy_breadcrumb": {
"3421745 - Home page segment not rendered as a link": "https://www.drupal.org/files/issues/2024-06-20/easy_breadcrumb-3421745-8.patch"
},
"drupal/bulk_user_registration": {
"POWR-3262 Bulk update existing users": "patches/powr-3262-bulk-update_existing_users.patch"
},
Expand Down Expand Up @@ -304,6 +307,7 @@
"3020883 - Use VBO together with group permission": "https://www.drupal.org/files/issues/2020-08-17/3020883-22.patch",
"3256998 - Access to Revisions of Group Content is Broken": "https://www.drupal.org/files/issues/2022-03-30/group-3256998-35.patch",
"3210808 - uasort deprecation in PHP 8": "https://www.drupal.org/files/issues/2021-04-26/uasort-comparison-3210808-2.patch",
"3336280 - avoid fatal error when group argument to GroupAccessResult:: allowedIfHasGroupPermissions() is NULL": "https://www.drupal.org/files/issues/2023-01-24/group-3336280-3.patch",
"3212608 - Crashes when using views data export in batch mode": "https://www.drupal.org/files/issues/2022-09-02/3212608-4.patch",
"3336280 - avoid fatal error when group argument to GroupAccessResult:: allowedIfHasGroupPermissions() is NULL": "https://www.drupal.org/files/issues/2023-01-24/group-3336280-3.patch",
"Change delete user text": "patches/change-delete-user-text.patch"
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 57 additions & 0 deletions migrate_group
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#! /bin/bash

# Exit on error
set -e
# Turn off warning that the site is in GIT mode
export TERMINUS_HIDE_GIT_MODE_WARNING=1

# Skip the custom code to sync group content. See portland_groups.module
terminus drush portlandor.$1 -- state:set portland.skip_group_sync 1

# Turn on maintenance mode
terminus drush portlandor.$1 -- state:set system.maintenance_mode 1 --input-format=integer

# Turn off email notification on Live
if [[ $1 == "live" ]]
then
terminus drush portlandor.$1 -- config:set mailsystem.settings defaults.sender 'test_mail_collector' -y
fi

# create taxonomy terms
# terminus drush portlandor.$1 -- cr
# terminus drush portlandor.$1 -- cim -y
# terminus drush portlandor.$1 -- portland:create_group_types

# advisory_group
# terminus drush portlandor.$1 -- portland:list_group_by_type advisory_group > ids_advisory_group.log
for word in $(cat ids_advisory_group.log | grep -v "^$"); do terminus drush portlandor.$1 -- portland:migrate_group $word; done

# # program
# terminus drush portlandor.$1 -- portland:list_group_by_type program > ids_program.log
# for word in $(cat ids_program.log | grep -v "^$"); do terminus drush portlandor.$1 -- portland:migrate_group $word; done

# # project
# terminus drush portlandor.$1 -- portland:list_group_by_type project > ids_project.log
# for word in $(cat ids_project.log | grep -v "^$"); do terminus drush portlandor.$1 -- portland:migrate_group $word; done

# # bureau_office
# terminus drush portlandor.$1 -- portland:list_group_by_type bureau_office > ids_bureau_office.log
# for word in $(cat ids_bureau_office.log | grep -v "^$"); do terminus drush portlandor.$1 -- portland:migrate_group $word; done

# Delete groups:
# time terminus drush portlandor.group-demo -- portland:delete_groups advisory_group
# time terminus drush portlandor.group-demo -- portland:delete_groups project
# time terminus drush portlandor.group-demo -- portland:delete_groups program
# time terminus drush portlandor.group-demo -- portland:delete_groups bureau_office

# # re-index
# terminus drush portlandor.$1 -- sapi-r
# terminus drush portlandor.$1 -- sapi-i

# retore mailer on Live
if [[ $1 == "live" ]]
then
terminus drush portlandor.$1 -- config:set mailsystem.settings defaults.sender 'sendgrid_integration' -y
fi

# terminus drush portlandor.$1 -- state:delete portland.skip_group_sync
185 changes: 185 additions & 0 deletions private/solr-conf/accents_cy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
# À => A
"\u00C0" => "A"
# Á => A
"\u00C1" => "A"
# Â => A
"\u00C2" => "A"
# Ã => A
"\u00C3" => "A"
# Ä => A
"\u00C4" => "A"
# Å => A
"\u00C5" => "A"
# Ą => A
"\u0104" => "A"
# Æ => AE
"\u00C6" => "AE"
# Ç => C
"\u00C7" => "C"
# Ć => C
"\U0106" => "C"
# È => E
"\u00C8" => "E"
# É => E
"\u00C9" => "E"
# Ê => E
"\u00CA" => "E"
# Ë => E
"\u00CB" => "E"
# Ę => E
"\u0118" => "E"
# Ì => I
"\u00CC" => "I"
# Í => I
"\u00CD" => "I"
# Î => I
"\u00CE" => "I"
# Ï => I
"\u00CF" => "I"
# IJ => IJ
"\u0132" => "IJ"
# Ð => D
"\u00D0" => "D"
# Ł => L
"\u0141" => "L"
# Ñ => N
"\u00D1" => "N"
# Ń => N
"\u0143" => "N"
# Ò => O
"\u00D2" => "O"
# Ó => O
"\u00D3" => "O"
# Ô => O
"\u00D4" => "O"
# Õ => O
"\u00D5" => "O"
# Ö => O
"\u00D6" => "O"
# Ø => O
"\u00D8" => "O"
# Œ => OE
"\u0152" => "OE"
# Þ
"\u00DE" => "TH"
# Ù => U
"\u00D9" => "U"
# Ú => U
"\u00DA" => "U"
# Û => U
"\u00DB" => "U"
# Ü => U
"\u00DC" => "U"
# Ý => Y
"\u00DD" => "Y"
# Ÿ => Y
"\u0178" => "Y"
# à => a
"\u00E0" => "a"
# á => a
"\u00E1" => "a"
# â => a
"\u00E2" => "a"
# ã => a
"\u00E3" => "a"
# ä => a
"\u00E4" => "a"
# å => a
"\u00E5" => "a"
# æ => ae
"\u00E6" => "ae"
# ç => c
"\u00E7" => "c"
# è => e
"\u00E8" => "e"
# é => e
"\u00E9" => "e"
# ê => e
"\u00EA" => "e"
# ë => e
"\u00EB" => "e"
# ì => i
"\u00EC" => "i"
# í => i
"\u00ED" => "i"
# î => i
"\u00EE" => "i"
# ï => i
"\u00EF" => "i"
# ij => ij
"\u0133" => "ij"
# ð => d
"\u00F0" => "d"
# ñ => n
"\u00F1" => "n"
# ò => o
"\u00F2" => "o"
# ó => o
"\u00F3" => "o"
# ô => o
"\u00F4" => "o"
# õ => o
"\u00F5" => "o"
# ö => o
"\u00F6" => "o"
# ø => o
"\u00F8" => "o"
# œ => oe
"\u0153" => "oe"
# ß => ss
"\u00DF" => "ss"
# Ś => S
"\u015a" => "S"
# þ => th
"\u00FE" => "th"
# ù => u
"\u00F9" => "u"
# ú => u
"\u00FA" => "u"
# û => u
"\u00FB" => "u"
# ü => u
"\u00FC" => "u"
# ý => y
"\u00FD" => "y"
# ÿ => y
"\u00FF" => "y"
# Ź => Z
"\u0179" => "Z"
# Ż => Z
"\u017b" => "Z"
# ff => ff
"\uFB00" => "ff"
# fi => fi
"\uFB01" => "fi"
# fl => fl
"\uFB02" => "fl"
# ffi => ffi
"\uFB03" => "ffi"
# ffl => ffl
"\uFB04" => "ffl"
# ſt => st
"\uFB05" => "st"
# st => st
"\uFB06" => "st"
# Māori macrons.
# Ā => A
"\u0100" => "A"
# Ē => E
"\u0112" => "E"
# Ī => I
"\u012A" => "I"
# Ō => O
"\u014C" => "O"
# Ū => U
"\u016A" => "U"
# ā => a
"\u0101" => "a"
# ē => e
"\u0113" => "e"
# ī => i
"\u012B" => "i"
# ō => o
"\u014D" => "o"
# ū => u
"\u016B" => "u"
1 change: 1 addition & 0 deletions private/solr-conf/nouns_cy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions private/solr-conf/protwords_cy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

8 changes: 0 additions & 8 deletions private/solr-conf/protwords_und.txt
Original file line number Diff line number Diff line change
@@ -1,8 +0,0 @@
#-----------------------------------------------------------------------
# This file blocks words from being operated on by the stemmer and word delimiter.
&
<
>
'
"
parking
2 changes: 1 addition & 1 deletion private/solr-conf/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
that avoids logging every request
-->

<schema name="drupal-4.3.3-solr-8.x-0" version="1.6">
<schema name="drupal-4.3.3-solr-8.x-1" version="1.6">
<!-- attribute "name" is the name of this schema and is only used for display purposes.
version="x.y" is Solr's version number for the schema syntax and
semantics. It should not normally be changed by applications.
Expand Down
Loading

0 comments on commit 2465e1b

Please sign in to comment.