diff --git a/config/core.entity_form_display.node.job.default.yml b/config/core.entity_form_display.node.job.default.yml index 28533403e..bcca5d6df 100644 --- a/config/core.entity_form_display.node.job.default.yml +++ b/config/core.entity_form_display.node.job.default.yml @@ -12,12 +12,9 @@ dependencies: - field.field.node.job.field_import_hash - field.field.node.job.field_job_closing_date - field.field.node.job.field_job_experience - - field.field.node.job.field_job_tagger_queue_count - field.field.node.job.field_job_type - field.field.node.job.field_source - field.field.node.job.field_theme - - field.field.node.job.reliefweb_job_tagger_info - - field.field.node.job.reliefweb_job_tagger_status - node.type.job module: - allowed_formats @@ -190,11 +187,8 @@ hidden: created: true field_import_guid: true field_import_hash: true - field_job_tagger_queue_count: true langcode: true promote: true - reliefweb_job_tagger_info: true - reliefweb_job_tagger_status: true status: true sticky: true uid: true diff --git a/config/core.entity_view_display.node.job.default.yml b/config/core.entity_view_display.node.job.default.yml index 4735853c3..3af4adf88 100644 --- a/config/core.entity_view_display.node.job.default.yml +++ b/config/core.entity_view_display.node.job.default.yml @@ -12,12 +12,9 @@ dependencies: - field.field.node.job.field_import_hash - field.field.node.job.field_job_closing_date - field.field.node.job.field_job_experience - - field.field.node.job.field_job_tagger_queue_count - field.field.node.job.field_job_type - field.field.node.job.field_source - field.field.node.job.field_theme - - field.field.node.job.reliefweb_job_tagger_info - - field.field.node.job.reliefweb_job_tagger_status - node.type.job module: - datetime @@ -115,8 +112,5 @@ content: hidden: field_import_guid: true field_import_hash: true - field_job_tagger_queue_count: true langcode: true links: true - reliefweb_job_tagger_info: true - reliefweb_job_tagger_status: true diff --git a/config/core.entity_view_display.node.job.teaser.yml b/config/core.entity_view_display.node.job.teaser.yml index 9d88c6d86..764868069 100644 --- a/config/core.entity_view_display.node.job.teaser.yml +++ b/config/core.entity_view_display.node.job.teaser.yml @@ -13,12 +13,9 @@ dependencies: - field.field.node.job.field_import_hash - field.field.node.job.field_job_closing_date - field.field.node.job.field_job_experience - - field.field.node.job.field_job_tagger_queue_count - field.field.node.job.field_job_type - field.field.node.job.field_source - field.field.node.job.field_theme - - field.field.node.job.reliefweb_job_tagger_info - - field.field.node.job.reliefweb_job_tagger_status - node.type.job module: - datetime @@ -59,10 +56,7 @@ hidden: field_import_guid: true field_import_hash: true field_job_experience: true - field_job_tagger_queue_count: true field_job_type: true field_theme: true langcode: true links: true - reliefweb_job_tagger_info: true - reliefweb_job_tagger_status: true diff --git a/config/core.extension.yml b/config/core.extension.yml index de823f20c..17ff1b3af 100644 --- a/config/core.extension.yml +++ b/config/core.extension.yml @@ -60,9 +60,8 @@ module: node: 0 ocha_ai: 0 ocha_ai_chat: 0 - ocha_ai_tag: 0 - ocha_entraid: 0 ocha_content_classification: 0 + ocha_entraid: 0 ocha_monitoring: 0 openid_connect: 0 openid_connect_windows_aad: 0 @@ -84,7 +83,6 @@ module: reliefweb_guidelines: 0 reliefweb_homepage: 0 reliefweb_import: 0 - reliefweb_job_tagger: 0 reliefweb_meta: 0 reliefweb_moderation: 0 reliefweb_reporting: 0 diff --git a/config/field.field.node.job.field_job_tagger_queue_count.yml b/config/field.field.node.job.field_job_tagger_queue_count.yml deleted file mode 100644 index 987da0ae1..000000000 --- a/config/field.field.node.job.field_job_tagger_queue_count.yml +++ /dev/null @@ -1,25 +0,0 @@ -uuid: ac87ff1a-b49d-47f9-8b81-6a3d30212913 -langcode: en -status: true -dependencies: - config: - - field.storage.node.field_job_tagger_queue_count - - node.type.job -id: node.job.field_job_tagger_queue_count -field_name: field_job_tagger_queue_count -entity_type: node -bundle: job -label: 'Job tagger queue count' -description: '' -required: false -translatable: false -default_value: - - - value: 0 -default_value_callback: '' -settings: - min: 0 - max: null - prefix: '' - suffix: '' -field_type: integer diff --git a/config/field.field.node.job.reliefweb_job_tagger_info.yml b/config/field.field.node.job.reliefweb_job_tagger_info.yml deleted file mode 100644 index 4b73a7226..000000000 --- a/config/field.field.node.job.reliefweb_job_tagger_info.yml +++ /dev/null @@ -1,26 +0,0 @@ -uuid: bf072428-5463-444c-aa3b-5867c18e5820 -langcode: en -status: true -dependencies: - config: - - field.storage.node.reliefweb_job_tagger_info - - filter.format.markdown - - node.type.job - module: - - text -_core: - default_config_hash: c9jZ6pByZz5O4j5rz8-PTwZpIhgpD5B9vRSD6y2KaL4 -id: node.job.reliefweb_job_tagger_info -field_name: reliefweb_job_tagger_info -entity_type: node -bundle: job -label: 'Job tagger info' -description: '' -required: false -translatable: false -default_value: { } -default_value_callback: '' -settings: - allowed_formats: - - markdown -field_type: text_long diff --git a/config/field.field.node.job.reliefweb_job_tagger_status.yml b/config/field.field.node.job.reliefweb_job_tagger_status.yml deleted file mode 100644 index baf6fd85c..000000000 --- a/config/field.field.node.job.reliefweb_job_tagger_status.yml +++ /dev/null @@ -1,23 +0,0 @@ -uuid: 1e084105-9ae6-435a-8c64-428e9957508e -langcode: en -status: true -dependencies: - config: - - field.storage.node.reliefweb_job_tagger_status - - node.type.job - module: - - options -_core: - default_config_hash: b39BL7pzxGe8ARXfSfgWQ56VdVlrzDeu5QPN0V6FB6U -id: node.job.reliefweb_job_tagger_status -field_name: reliefweb_job_tagger_status -entity_type: node -bundle: job -label: 'Job tagger state' -description: '' -required: false -translatable: false -default_value: { } -default_value_callback: '' -settings: { } -field_type: list_string diff --git a/config/field.storage.node.field_job_tagger_queue_count.yml b/config/field.storage.node.field_job_tagger_queue_count.yml deleted file mode 100644 index c8445f719..000000000 --- a/config/field.storage.node.field_job_tagger_queue_count.yml +++ /dev/null @@ -1,20 +0,0 @@ -uuid: a8443d1d-5ac8-4d42-b340-a7dc9726ef51 -langcode: en -status: true -dependencies: - module: - - node -id: node.field_job_tagger_queue_count -field_name: field_job_tagger_queue_count -entity_type: node -type: integer -settings: - unsigned: false - size: normal -module: core -locked: false -cardinality: 1 -translatable: true -indexes: { } -persist_with_no_fields: false -custom_storage: false diff --git a/config/field.storage.node.reliefweb_job_tagger_info.yml b/config/field.storage.node.reliefweb_job_tagger_info.yml deleted file mode 100644 index b8b542637..000000000 --- a/config/field.storage.node.reliefweb_job_tagger_info.yml +++ /dev/null @@ -1,21 +0,0 @@ -uuid: c9d57c46-67fe-4662-a647-cbc139b8b5ab -langcode: en -status: true -dependencies: - module: - - node - - text -_core: - default_config_hash: unTujV1MU9BLJ6YJTAJP79UzayOJZqe3ENIunYL_eoU -id: node.reliefweb_job_tagger_info -field_name: reliefweb_job_tagger_info -entity_type: node -type: text_long -settings: { } -module: text -locked: true -cardinality: 1 -translatable: true -indexes: { } -persist_with_no_fields: false -custom_storage: false diff --git a/config/field.storage.node.reliefweb_job_tagger_status.yml b/config/field.storage.node.reliefweb_job_tagger_status.yml deleted file mode 100644 index b9a931117..000000000 --- a/config/field.storage.node.reliefweb_job_tagger_status.yml +++ /dev/null @@ -1,35 +0,0 @@ -uuid: eff4e934-a8c8-4c26-87dd-3e86f9311a78 -langcode: en -status: true -dependencies: - module: - - node - - options -_core: - default_config_hash: bGdwPWYjAlDGCrUl508wL_rTVtBV2UWW1UJtbe5PFB8 -id: node.reliefweb_job_tagger_status -field_name: reliefweb_job_tagger_status -entity_type: node -type: list_string -settings: - allowed_values: - - - value: queue - label: queue - - - value: queued - label: queued - - - value: processed - label: processed - - - value: skipped - label: skipped - allowed_values_function: '' -module: options -locked: true -cardinality: 1 -translatable: true -indexes: { } -persist_with_no_fields: false -custom_storage: false diff --git a/config/ocha_ai_tag.settings.yml b/config/ocha_ai_tag.settings.yml deleted file mode 100644 index a746a18fc..000000000 --- a/config/ocha_ai_tag.settings.yml +++ /dev/null @@ -1,21 +0,0 @@ -_core: - default_config_hash: r1hk7e31MjYWgy4AuBRXxwuhornPFBp0LDrncwSG38Q -defaults: - form: - instructions: - value: 'The process of posting jobs via ReliefWeb is now even smoother. The form now includes an automated function for the "career" and "themes" categories; fewer fields for users to fill and higher efficiency overall.' - format: markdown_editor - plugins: - embedding: - plugin_id: aws_bedrock_titan_embed_text_v2 - text_extractor: - application/pdf: - plugin_id: mupdf - text_splitter: - plugin_id: token - vector_store: - plugin_id: elasticsearch_job - completion: - plugin_id: aws_bedrock - source: - plugin_id: reliefweb diff --git a/config/ocha_content_classification.ocha_classification_workflow.node_job.yml b/config/ocha_content_classification.ocha_classification_workflow.node_job.yml index 0c2eb32b4..084ba9e59 100644 --- a/config/ocha_content_classification.ocha_classification_workflow.node_job.yml +++ b/config/ocha_content_classification.ocha_classification_workflow.node_job.yml @@ -16,8 +16,6 @@ fields: enabled: true field_how_to_apply: enabled: false - reliefweb_job_tagger_info: - enabled: false classifiable: field_career_categories: enabled: true diff --git a/config/reliefweb_job_tagger.settings.yml b/config/reliefweb_job_tagger.settings.yml deleted file mode 100644 index befeaa19f..000000000 --- a/config/reliefweb_job_tagger.settings.yml +++ /dev/null @@ -1 +0,0 @@ -use_es: true diff --git a/config/views.view.stalled_jobs.yml b/config/views.view.stalled_jobs.yml deleted file mode 100644 index fab542b44..000000000 --- a/config/views.view.stalled_jobs.yml +++ /dev/null @@ -1,425 +0,0 @@ -uuid: 0de05c1e-1423-47cd-ba0f-2e447f3117b8 -langcode: en -status: true -dependencies: - config: - - node.type.job - module: - - node - - options - - user -id: stalled_jobs -label: 'Stalled jobs' -module: views -description: '' -tag: '' -base_table: node_field_data -base_field: nid -display: - default: - id: default - display_title: Default - display_plugin: default - position: 0 - display_options: - title: 'Stalled jobs' - fields: - title: - id: title - table: node_field_data - field: title - relationship: none - group_type: group - admin_label: '' - entity_type: node - entity_field: title - plugin_id: field - label: Title - exclude: false - alter: - alter_text: false - make_link: false - absolute: false - word_boundary: false - ellipsis: false - strip_tags: false - trim: false - html: false - element_type: '' - element_class: '' - element_label_type: '' - element_label_class: '' - element_label_colon: true - element_wrapper_type: '' - element_wrapper_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - click_sort_column: value - type: string - settings: - link_to_entity: true - group_column: value - group_columns: { } - group_rows: true - delta_limit: 0 - delta_offset: 0 - delta_reversed: false - delta_first_last: false - multi_type: separator - separator: ', ' - field_api_classes: false - created: - id: created - table: node_field_data - field: created - relationship: none - group_type: group - admin_label: '' - entity_type: node - entity_field: created - plugin_id: field - label: 'Authored on' - exclude: false - alter: - alter_text: false - text: '' - make_link: false - path: '' - absolute: false - external: false - replace_spaces: false - path_case: none - trim_whitespace: false - alt: '' - rel: '' - link_class: '' - prefix: '' - suffix: '' - target: '' - nl2br: false - max_length: 0 - word_boundary: true - ellipsis: true - more_link: false - more_link_text: '' - more_link_path: '' - strip_tags: false - trim: false - preserve_tags: '' - html: false - element_type: '' - element_class: '' - element_label_type: '' - element_label_class: '' - element_label_colon: true - element_wrapper_type: '' - element_wrapper_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - click_sort_column: value - type: timestamp - settings: - date_format: medium - custom_date_format: '' - timezone: '' - tooltip: - date_format: long - custom_date_format: '' - time_diff: - enabled: false - future_format: '@interval hence' - past_format: '@interval ago' - granularity: 2 - refresh: 60 - description: '' - group_column: value - group_columns: { } - group_rows: true - delta_limit: 0 - delta_offset: 0 - delta_reversed: false - delta_first_last: false - multi_type: separator - separator: ', ' - field_api_classes: false - status: - id: status - table: node_field_data - field: status - relationship: none - group_type: group - admin_label: '' - entity_type: node - entity_field: status - plugin_id: field - label: Published - exclude: false - alter: - alter_text: false - text: '' - make_link: false - path: '' - absolute: false - external: false - replace_spaces: false - path_case: none - trim_whitespace: false - alt: '' - rel: '' - link_class: '' - prefix: '' - suffix: '' - target: '' - nl2br: false - max_length: 0 - word_boundary: true - ellipsis: true - more_link: false - more_link_text: '' - more_link_path: '' - strip_tags: false - trim: false - preserve_tags: '' - html: false - element_type: '' - element_class: '' - element_label_type: '' - element_label_class: '' - element_label_colon: true - element_wrapper_type: '' - element_wrapper_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - click_sort_column: value - type: boolean - settings: - format: default - format_custom_false: '' - format_custom_true: '' - group_column: value - group_columns: { } - group_rows: true - delta_limit: 0 - delta_offset: 0 - delta_reversed: false - delta_first_last: false - multi_type: separator - separator: ', ' - field_api_classes: false - operations: - id: operations - table: node - field: operations - relationship: none - group_type: group - admin_label: '' - entity_type: node - plugin_id: entity_operations - label: Operations - exclude: false - alter: - alter_text: false - text: '' - make_link: false - path: '' - absolute: false - external: false - replace_spaces: false - path_case: none - trim_whitespace: false - alt: '' - rel: '' - link_class: '' - prefix: '' - suffix: '' - target: '' - nl2br: false - max_length: 0 - word_boundary: true - ellipsis: true - more_link: false - more_link_text: '' - more_link_path: '' - strip_tags: false - trim: false - preserve_tags: '' - html: false - element_type: '' - element_class: '' - element_label_type: '' - element_label_class: '' - element_label_colon: true - element_wrapper_type: '' - element_wrapper_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - destination: false - pager: - type: mini - options: - offset: 0 - pagination_heading_level: h4 - items_per_page: 10 - total_pages: null - id: 0 - tags: - next: ›› - previous: ‹‹ - expose: - items_per_page: false - items_per_page_label: 'Items per page' - items_per_page_options: '5, 10, 25, 50' - items_per_page_options_all: false - items_per_page_options_all_label: '- All -' - offset: false - offset_label: Offset - exposed_form: - type: basic - options: - submit_button: Apply - reset_button: false - reset_button_label: Reset - exposed_sorts_label: 'Sort by' - expose_sort_order: true - sort_asc_label: Asc - sort_desc_label: Desc - access: - type: perm - options: - perm: 'edit any job content' - cache: - type: tag - options: { } - empty: { } - sorts: - created: - id: created - table: node_field_data - field: created - relationship: none - group_type: group - admin_label: '' - entity_type: node - entity_field: created - plugin_id: date - order: DESC - expose: - label: '' - field_identifier: '' - exposed: false - granularity: second - arguments: { } - filters: - type: - id: type - table: node_field_data - field: type - entity_type: node - entity_field: type - plugin_id: bundle - value: - job: job - reliefweb_job_tagger_status_value: - id: reliefweb_job_tagger_status_value - table: node__reliefweb_job_tagger_status - field: reliefweb_job_tagger_status_value - relationship: none - group_type: group - admin_label: '' - plugin_id: list_field - operator: or - value: - skipped: skipped - group: 1 - exposed: false - expose: - operator_id: '' - label: '' - description: '' - use_operator: false - operator: '' - operator_limit_selection: false - operator_list: { } - identifier: '' - required: false - remember: false - multiple: false - remember_roles: - authenticated: authenticated - reduce: false - is_grouped: false - group_info: - label: '' - description: '' - identifier: '' - optional: true - widget: select - multiple: false - remember: false - default_group: All - default_group_multiple: { } - group_items: { } - reduce_duplicates: false - style: - type: table - row: - type: fields - query: - type: views_query - options: - query_comment: '' - disable_sql_rewrite: false - distinct: false - replica: false - query_tags: { } - relationships: { } - header: { } - footer: { } - display_extenders: { } - cache_metadata: - max-age: -1 - contexts: - - 'languages:language_content' - - 'languages:language_interface' - - url.query_args - - 'user.node_grants:view' - - user.permissions - tags: { } - page_1: - id: page_1 - display_title: Page - display_plugin: page - position: 1 - display_options: - display_extenders: { } - path: admin/content/stalled-jobs - menu: - type: tab - title: 'Stalled jobs' - description: '' - weight: 50 - expanded: false - menu_name: admin - parent: system.admin_content - context: '0' - cache_metadata: - max-age: -1 - contexts: - - 'languages:language_content' - - 'languages:language_interface' - - url.query_args - - 'user.node_grants:view' - - user.permissions - tags: { } diff --git a/html/modules/custom/reliefweb_reporting/reliefweb_reporting.module b/html/modules/custom/reliefweb_reporting/reliefweb_reporting.module index 5b6befcb9..95609dbf2 100644 --- a/html/modules/custom/reliefweb_reporting/reliefweb_reporting.module +++ b/html/modules/custom/reliefweb_reporting/reliefweb_reporting.module @@ -47,43 +47,6 @@ function reliefweb_reporting_get_weekly_ai_tagging_stats() { $schema = \Drupal::database()->schema(); $records = []; - // To avoid losing data when transitioning, we fetch the information from the - // previous tagging system and concatenate it with the new one. - if ($schema->tableExists('node_revision__reliefweb_job_tagger_status')) { - $old_records = $connection->query(" - SELECT - nr.nid AS nid, - nr.vid As vid, - IFNULL(GROUP_CONCAT(DISTINCT ur.roles_target_id ORDER BY ur.roles_target_id SEPARATOR ','), '') AS roles, - GROUP_CONCAT(DISTINCT nfcc.field_career_categories_target_id ORDER BY nfcc.field_career_categories_target_id SEPARATOR ',') AS career_categories, - GROUP_CONCAT(DISTINCT nft.field_theme_target_id ORDER BY nft.field_theme_target_id SEPARATOR ',') AS themes - FROM node_revision AS nr - INNER JOIN node_field_data AS n - ON n.nid = nr.nid - INNER JOIN node_revision__reliefweb_job_tagger_status AS njts - ON njts.entity_id = n.nid - AND njts.revision_id = nr.vid - AND njts.reliefweb_job_tagger_status_value = 'processed' - LEFT JOIN user__roles AS ur - ON ur.entity_id = nr.revision_uid - LEFT JOIN node_revision__field_career_categories AS nfcc - ON nfcc.entity_id = nr.nid - AND nfcc.revision_id = nr.vid - LEFT JOIN node_revision__field_theme AS nft - ON nft.entity_id = nr.nid - AND nft.revision_id = nr.vid - WHERE n.type = 'job' - AND n.created >= UNIX_TIMESTAMP(DATE_SUB(DATE(NOW()), INTERVAL DAYOFWEEK(NOW()) + 6 DAY)) - AND n.created < UNIX_TIMESTAMP(DATE_SUB(DATE(NOW()), INTERVAL DAYOFWEEK(NOW()) - 1 DAY)) - GROUP BY nr.vid - ORDER BY nr.vid - ")->fetchAll(\PDO::FETCH_ASSOC); - - foreach ($old_records as $record) { - $records[$record['nid']][$record['vid']] = $record; - } - } - if ($schema->tableExists('ocha_content_classification_progress')) { $new_records = $connection->query(" SELECT diff --git a/html/modules/custom/reliefweb_utility/reliefweb_utility.module b/html/modules/custom/reliefweb_utility/reliefweb_utility.module index d8935cb6c..24e49d412 100644 --- a/html/modules/custom/reliefweb_utility/reliefweb_utility.module +++ b/html/modules/custom/reliefweb_utility/reliefweb_utility.module @@ -5,6 +5,7 @@ * Helper functions that applies to a variety of things on ReliefWeb. */ +use Drupal\Core\File\Exception\FileException; use Drupal\Core\Template\Attribute; use Drupal\file\FileInterface; diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index d38cc167f..5261cc294 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -22,7 +22,7 @@ services: MEMCACHE_MAX_MEMORY: 64 mysql: - image: public.ecr.aws/unocha/mysql:10.11 + image: public.ecr.aws/unocha/mysql:11 hostname: rwint-test-mysql container_name: rwint-test-mysql environment: