From 705d005e4e7d6d75e0f402fcf08e3c643b5af3d4 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Tue, 29 Oct 2024 13:34:27 -0400 Subject: [PATCH 01/36] new pd table for grants (monthly) --- bin/filter/filter_grants_monthly.py | 26 + ckanext/canada/plugins.py | 1 + ckanext/canada/tables/grantsmonthly.yaml | 827 ++++++++++++++++++ .../canada/templates/home/quick_links.html | 1 + .../recombinant/create_pd_record.html | 2 +- .../templates/snippets/cdts/header.html | 4 + 6 files changed, 860 insertions(+), 1 deletion(-) create mode 100755 bin/filter/filter_grants_monthly.py create mode 100644 ckanext/canada/tables/grantsmonthly.yaml diff --git a/bin/filter/filter_grants_monthly.py b/bin/filter/filter_grants_monthly.py new file mode 100755 index 000000000..707bdb4f6 --- /dev/null +++ b/bin/filter/filter_grants_monthly.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +"filter for grantsmonthly.csv" + +import csv +import sys + +REMOVE_COLUMNS = [ + 'record_created', + 'record_modified', + 'user_modified', +] + +def main(): + reader = csv.DictReader(sys.stdin) + outnames = [f for f in reader.fieldnames if f not in REMOVE_COLUMNS] + writer = csv.DictWriter(sys.stdout, outnames) + writer.writeheader() + for row in reader: + try: + for rem in REMOVE_COLUMNS: + del row[rem] + writer.writerow(row) + except ValueError: + pass + +main() diff --git a/ckanext/canada/plugins.py b/ckanext/canada/plugins.py index 508df9669..c27046025 100755 --- a/ckanext/canada/plugins.py +++ b/ckanext/canada/plugins.py @@ -641,6 +641,7 @@ def update_config(self, config): ckanext.canada:tables/contracts.yaml ckanext.canada:tables/contractsa.yaml ckanext.canada:tables/grants.yaml +ckanext.canada:tables/grantsmonthly.yaml ckanext.canada:tables/hospitalityq.yaml ckanext.canada:tables/reclassification.yaml ckanext.canada:tables/travela.yaml diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml new file mode 100644 index 000000000..165bf1721 --- /dev/null +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -0,0 +1,827 @@ +dataset_type: grantsmonthly +target_dataset: grantsmonthly +title: Proactive Publication - Grants and Contributions (Monthly) +shortname: Grants and Contributions (Monthly) +notes: Access, upload and modify the Grants and Contributions monthly reports for your organization + +template_version: 1 +template_updated: 2024-10-25 + +portal_type: info +collection: pd + +resources: +- title: Proactive Publication - Grants and Contributions (Monthly) + resource_name: grantsmonthly + + published_resource_id: TBD + + create_form: true + edit_form: true + fields: + + # 1.1 Reference Number + - datastore_id: ref_number + label: + en: Reference Number + fr: Numéro de référence + description: + en: | + The Reference number is populated by departments. It is a unique reference number given to each entry. Having a unique identifier for each item will allow departments to locate a specific item in the registry should they need to modify or delete. + + Controlled format; This field is populated in the following format DDD-YYYY-YYYY-QX-XXXXX + 1. DDD represents the department number – See annex A for list of department numbers + 2. YYYY-YYYY represents the fiscal year + 3. QX represents the fiscal quarter + 4. XXXXX represents the unique number assigned by the department for each entry. + + For example, entries in the 2018-2019 Q1 fiscal year should be assigned numbers as follows: 001-2018-2019-Q1-00001, 001-2018-2019-Q1-00002, 001-2018-2019-Q1-00003, etc.' + fr: | + Ce champ est rempli par l’utilisateur. L’identificateur de projet ministériel permet aux ministères d’identifier rapidement les rapports produits dans leur propre système. Les ministères devraient utiliser un chiffre qui est logique pour le ministère. Ces renseignements seront publiés dans le cadre du rapport. + + Format contrôlé; Ce champ est rempli au format suivant: DDD-YYYY-YYYY-QX-XXXXX + 1. DDD représente le numéro de département - Voir l’annexe A pour la liste des numéros de département. + 2. AAAA-AAAA représente l'année fiscale + 3. QX représente le trimestre fiscal + 4. XXXXX représente le numéro unique attribué par le département pour chaque entrée. + + Par exemple, les numéros de l'exercice 2018-2019 du T1 devraient recevoir les numéros suivants: 001-2018-2019-Q1-00001, 001-2018-2019-Q1-00002, 001-2018-2019-Q1-00003, etc.' + obligation: Mandatory + excel_required: true + form_required: true + format_type: Free text + datastore_type: text + + # 1.2 Amendment Number + - datastore_id: amendment_number + label: + en: Amendment Number + fr: Numéro de modification + description: + en: This field is populated by departments and identifies that an amendment is occurring to original information. Use 0 for original records. + fr: Ce champ est rempli par les ministères et indique qu'une modification est apportée aux renseignements originaux. Utiliser 0 pour les enregistrements originaux. + obligation: Mandatory + excel_required: true + form_required: true + format_type: Numeric only + datastore_type: int + + # 1.3 Amendment Date + - datastore_id: amendment_date + label: + en: Amendment Date + fr: Date de modification + description: + en: This field is populated by departments and indicates the date on which an amendment (or amendments) took place. If the amendment number is not zero, this field is required. + fr: Ce champ est rempli par les ministères et indique la date à laquelle une modification (ou des modifications) a été apportée. Vous devez remplir ce champ si le numéro de la modification indique un autre chiffre que 0. + obligation: + en: Mandatory if amendment number set + fr: Obligatoire si le numéro de modification est défini + format_type: Date (Please format the data as YYYY-MM-DD) + datastore_type: date + excel_cell_required_formula: 'and({column}{row}="",{column_before}{row}<>0)' + form_snippet: scheming/form_snippets/date.html + + # 1.4 Agreement Type + - datastore_id: agreement_type + label: + en: Agreement Type + fr: Type d’entente + description: + en: This field is populated by departments and indicates whether the agreement signed is a grant, contribution or other transfer payment. + fr: Ce champ est rempli par les ministères et indique si l'entente signée vise une subvention, une contribution ou un autre paiement de transfert. + obligation: Mandatory + excel_required: true + form_required: true + format_type: Controlled List + datastore_type: text + choices: + G: + en: Grant + fr: subvention + C: + en: Contribution + fr: contribution + O: + en: Other transfer payment + fr: autre + + # 1.5 Recipient Type + - datastore_id: recipient_type + label: + en: Recipient Type + fr: Type de bénéficiaire + description: + en: The recipient type helps identify who is receiving the money. + fr: Le type de bénéficiaire permet d'identifier qui reçoit l'argent. + obligation: Optional + format_type: Controlled List + datastore_type: text + choices: + F: + en: For-profit organizations + fr: organisme à but lucratif + N: + en: Not-for-profit organizations and charities + fr: organisme à but non lucratif et organisme de bienfaisance + S: + en: Academia + fr: établissement universitaire et institution publique + A: + en: Aboriginal recipients + fr: bénéficiaire autochtone + G: + en: Government + fr: gouvernement + I: + en: International (non-government) + fr: organisation internationale (non gouvernementale) + P: + en: Individual or sole proprietorships + fr: particulier ou entreprise à propriétaire unique + O: + en: Other + fr: autre + + # 1.6 Recipient Business Number + - datastore_id: recipient_business_number + label: + en: Recipient Business Number + fr: Numéro d'entreprise du bénéficiaire + description: + en: | + The Business Number is a nine digit number issued by the Canada Revenue Agency since 1994. Per the Directive on the Business Number, it has been identified as the standard identifier for all transactions between businesses and the Government of Canada, including transactions linked to grant and/or contribution funding. + + The business number should be populated for an organization or charity. + + Real-time validation of business identity information linked to the Business Number, including legal name and operating name, for sole proprietorship, partnerships and incorporations, is available to departments through the Business Number Web Validation Service. For more details contact ic.bnadoptionne.ic@canada.ca. + + To validate a Business Number associated with a charity, departments can access the List of Charities basic search on the Canada.ca website. Enter the Charity name and click the Search button. Then click the Charity name of the search result to find additional information about the charity (e.g., Charity Program number, charity status, effective date of status, designation, etc.) Legal name and operating name cannot be validated using this basic search. + + A business number is issued when an organization is registered federally, provincially or municipally. It does not change and will allow for consistent identification even if the legal name, the operation name or the organization changes over the life cycle of the grant or contribution. + fr: | + Depuis 1994, l’Agence du revenu du Canada émet des numéros d’entreprise à neuf chiffres. Aux termes de la Directive sur le numéro d’entreprise, le numéro d’entreprise constitue l’identificateur standard de toutes les opérations effectuées entre une entreprise et le gouvernement du Canada, y compris les opérations associées à une subvention ou à un financement de contribution. + + Le numéro d’entreprise devrait être consigné pour une organisation ou un organisme de bienfaisance. + + Les ministères peuvent obtenir la validation en temps réel de l’identité d’une entreprise en saisissant son numéro d’entreprise dans le Service de validation du numéro d’entreprise en ligne, qui inclut le nom légal et le nom commercial pour les entreprises individuelles, les partenariats et les constitutions en personne morale. Si vous voulez obtenir de plus amples renseignements, envoyez un courriel à ic.bnadoptionne.ic@canada.ca. + + Pour valider un numéro d’entreprise associé à un organisme de bienfaisance, les ministères peuvent effectuer une recherche de base dans la Liste d’organismes de bienfaisance, sur le site Web Canada.ca. Entrez le nom de l’organisme de bienfaisance, puis cliquez sur le bouton de Recherche. Ensuite, cliquez sur le nom de l’organisme de bienfaisance tiré du résultat de la recherche afin de trouver de plus amples renseignements sur l’organisme de bienfaisance (p. ex., le numéro du programme de bienfaisance, le statut de l’organisme de bienfaisance, la date d’entrée en vigueur du statut et la désignation de l’organisme de bienfaisance). Il est impossible de valider le nom légal et le nom commercial au moyen de la fonction de recherche de base. + obligation: Optional + format_type: Free text + datastore_type: text + + # 1.7 Recipient Legal Name + - datastore_id: recipient_legal_name + label: + en: Recipient Legal Name (English|French) + fr: Nom légal du bénéficiaire (anglais|français) + description: + en: | + The recipient legal name is meant to complement the existing “Recipient business number” field. It is the legal name of the recipient. This information should be taken from the agreement. + + Only translated if the legal name is provided in both official languages by the recipient. Provide in the following format: name English|name French. + fr: | + Le nom légal du bénéficiaire se veut complémentaire au champ « Numéro d'entreprise du bénéficiaire ». Cette information devrait être tirée de l'entente de subvention ou de contribution. + + Traduction seulement si le nom légal est fourni dans les deux langues officielles par le bénéficiaire. Fournir dans le format suivant : nom anglais|nom français. + obligation: Mandatory + excel_required: true + form_required: true + format_type: Free text + datastore_type: text + form_attrs: + size: 60 + + # 1.8 Recipient Operating Name + - datastore_id: recipient_operating_name + label: + en: Recipient Operating Name (English|French) + fr: Nom commercial du bénéficiaire (anglais|français) + description: + en: | + The “Recipient operating name” is an optional field used when an organization operates under a name that differs from its legal name or business number. When a researcher receives funding through a university, this information would be populated here. This field is not intended to capture the ultimate recipient of a grant or contribution; instead, the name of the person receiving funding from the Government of Canada should be entered. + + Only translated if the name is provided in both official languages by the recipient. Provide in the following format: Legal name English|Legal name French. + fr: | + Le champ « Nom commercial du bénéficiaire » est un champ facultatif utilisé dans le cas d'organisations qui exercent leurs activités sous un nom différent de leur nom légal ou de leur numéro d'entreprise. Dans le cas de chercheurs qui reçoivent leur financement par l'entremise d'une université, cette information doit être entrée ici. Ce champ ne sert pas à saisir le nom du bénéficiaire ultime de la subvention ou de la contribution, mais plutôt celui de la personne qui reçoit le financement du gouvernement du Canada. + + Traduction seulement si le nom est fourni dans les deux langues officielles par le bénéficiaire. Fournir dans le format suivant : nom anglais|nom français. + format_type: Free text + datastore_type: text + form_attrs: + size: 60 + + # 1.9 Recipient Country + - datastore_id: recipient_country + label: + en: Recipient Country + fr: Pays du bénéficiaire + description: + en: The “Recipient country” is a mandatory field. It is the country in which the recipient resides. + fr: Le « Pays du bénéficiaire » est un champ obligatoire qui indique le pays de résidence du bénéficiaire. + obligation: Mandatory + excel_required: true + form_required: true + format_type: Controlled List + datastore_type: text + choices_file: choices/country.json + + # 1.10 Recipient Province or Territory + - datastore_id: recipient_province + label: + en: Recipient Province or Territory + fr: Province ou territoire du bénéficiaire + description: + en: The "Recipient province or territory" is a mandatory field that identifies where, within Canada, the recipient resides. + fr: Le champ « province ou territoire du bénéficiaire » est un champ obligatoire qui indique le lieu de résidence du bénéficiaire au Canada. + obligation: Optional + format_type: Controlled List + datastore_type: text + excel_cell_required_formula: 'and({column}{row}="",{column_before}{row}="CA")' + choices: + "ON": + en: Ontario + fr: Ontario + QC: + en: Quebec + fr: Québec + NB: + en: New Brunswick + fr: Nouveau-Brunswick + NL: + en: Newfoundland & Labrador + fr: Terre-Neuve-et-Labrador + PE: + en: Prince Edward Island + fr: Île-du-Prince-Édouard + SK: + en: Saskatchewan + fr: Saskatchewan + YT: + en: Yukon + fr: Yukon + AB: + en: Alberta + fr: Alberta + BC: + en: British Columbia + fr: Colombie-Britannique + MB: + en: Manitoba + fr: Manitoba + NT: + en: Northwest Territories + fr: Territoires du Nord-Ouest + NU: + en: Nunavut + fr: Nunavut + NS: + en: Nova Scotia + fr: Nouvelle-Écosse + + # 1.11 Recipient City + - datastore_id: recipient_city + label: + en: Recipient City (English|French) + fr: Ville du bénéficiaire (anglais|français) + description: + en: | + The "Recipient city" is a mandatory field that identifies which city the recipient operates in. This field can be populated with Canadian or foreign cities. + + Official city names should be provided, including both official languages (where applicable in the following format: name English|name French + + Free text, but a controlled list from Canada Revenue Agency’s qualified donees list of municipalities can be consulted: Canada Revenue Agency website (http://www.cra-arc.gc.ca/chrts-gvng/qlfd-dns/mncplts-eng.html). + fr: | + La « Ville du bénéficiaire » est un champ obligatoire qui indique la ville où le bénéficiaire exerce ses activités. On peut y inscrire le nom de villes canadiennes ou de villes étrangères. + + Nom officiel exact de la ville, y compris dans les deux langues officielles (le cas échéant) au format suivant : nom anglais|nom français + + Texte libre, mais une liste contrôlée de la liste des municipalités désignées donataires de l’Agence du revenu du Canada peut être consultée: site Web de l’Agence du revenu du Canada (http://www.cra-arc.gc.ca/chrts-gvng/qlfd-dns/mncplts-fra.html). + obligation: Mandatory + excel_required: true + form_required: true + format_type: Free text + datastore_type: text + form_attrs: + size: 60 + + # 1.12 Recipient Postal Code + - datastore_id: recipient_postal_code + label: + en: Recipient Postal Code + fr: Code postal du bénéficiaire + description: + en: | + The "Recipient postal code" is a mandatory field that serves to identify the specific area in which the recipient operates. In cases where this field cannot be populated this field may be left blank. + + Text format locked to "X#X #X#"; The Canada Post tool for looking up a postal code can be found on the Canada Post website. + fr: | + Le « Code postal du bénéficiaire » est un champ obligatoire qui sert à identifier avec précision la région où le bénéficiaire exerce ses activités. Si le fait de remplir ce champ suscite des préoccupations à l'égard de la vie privée, il est possible de le laisser vide. + + Format de texte : "X#X #X#"; L'outil de Postes Canada permettant de rechercher un code postal se trouve sur le site Web de Postes Canada. + obligation: Optional + format_type: "Text format locked to (X#X #X#)" + datastore_type: text + + # 1.13 Federal Riding Number + - datastore_id: federal_riding_number + label: + en: Federal Riding Number + fr: Numéro de la circonscription fédérale + description: + en: The federal riding number is based on the riding in which the recipient resides. Departments can consult the Elections Canada website in order to retrieve the federal riding number. http://www.elections.ca/content.aspx?section=res&dir=cir/list&document=index338&lang=e + fr: Numéro de la circonscription fédérale où réside le bénéficiaire. Les départements peuvent consulter le site-web d’Élections Canada pour trouver le numéro de la circonscription fédérale. http://www.elections.ca/content.aspx?section=res&dir=cir/list&document=index338&lang=f + obligation: Optional + format_type: Free text + datastore_type: text + + # 1.14 Program Name (English) + - datastore_id: prog_name_en + label: + en: Program Name (English) + fr: Nom du programme (anglais) + description: + en: The program name is the name of the program, according to the terms and conditions (Ts&Cs), under which a recipient is funded. + fr: Le nom du programme selon les modalités en vertu desquelles le financement est versé au bénéficiaire. + obligation: Optional + format_type: Free text + datastore_type: text + form_attrs: + size: 60 + + # 1.15 Program Name (French) + - datastore_id: prog_name_fr + label: + en: Program Name (French) + fr: Nom du programme (français) + description: + en: The program name is the name of the program, according to the terms and conditions (Ts&Cs), under which a recipient is funded. + fr: Le nom du programme selon les modalités en vertu desquelles le financement est versé au bénéficiaire. + obligation: Optional + format_type: Free text + datastore_type: text + form_attrs: + size: 60 + + # 1.16 Program Purpose (English) + - datastore_id: prog_purpose_en + label: + en: Program Purpose (English) + fr: But du programme (anglais) + description: + en: The program purpose is the program’s purpose according to the Ts&Cs. + fr: Le but du programme est celui dans lequel le programme a été créé, selon les modalités du programme. + obligation: Optional + format_type: Free text + datastore_type: text + form_snippet: scheming/form_snippets/textarea.html + form_attrs: + style: "width: 100%; display: block" + + # 1.17 Program Purpose (French) + - datastore_id: prog_purpose_fr + label: + en: Program Purpose (French) + fr: But du programme (français) + description: + en: The program purpose is the program’s purpose according to the Ts&Cs. + fr: Le but du programme est celui dans lequel le programme a été créé, selon les modalités du programme. + obligation: Optional + format_type: Free text + datastore_type: text + form_snippet: scheming/form_snippets/textarea.html + form_attrs: + style: "width: 100%; display: block" + + # 1.18 Agreement Number + - datastore_id: agreement_number + label: + en: Agreement Number + fr: Numéro de l’entente + description: + en: The agreement number should be the number on the agreement and/or in the departmental Gs&Cs system. + fr: Le numéro de l'entente est celui qui figure à l'entente et/ou dans le système de subventions et de contributions du ministère. + obligation: Optional + format_type: Free text + datastore_type: text + + # 1.19 Agreement Value in CAD + - datastore_id: agreement_value + label: + en: Agreement Value in CAD + fr: Valeur de l’entente en dollars canadiens + description: + en: The agreement value is the dollar amount stated in the grant or contribution agreement. This field should be populated with a monetary value in Canadian dollars. + fr: La valeur de l'entente est le montant en dollars indiqué dans l'entente de subvention ou de contribution. Ce champ doit indiquer une valeur monétaire en dollars canadiens. + obligation: Mandatory + excel_required: true + form_required: true + datastore_type: money + + solr_dollar_range_facet: + - 10000 + - 25000 + - 100000 + - 1000000 + - 5000000 + + # 1.20 Agreement Start Date + - datastore_id: agreement_start_date + label: + en: Agreement Start Date + fr: Date de début de l’entente + description: + en: The agreement start date is the assumed start of the agreement, or when the project is supposed to begin, as captured in the initial agreement. + fr: La date de début de l'entente est la date d'entrée en vigueur présumée de l'entente ou la date à laquelle le projet est censé commencer, conformément à l'entente initiale. + obligation: Mandatory + excel_required: true + form_required: true + form_snippet: scheming/form_snippets/date.html + format_type: Date (Please format the data as YYYY-MM-DD) + datastore_type: date + extract_date_year: true + extract_date_month: true + extract_date_clean: true + + # 1.21 Projected Agreement End Date + - datastore_id: agreement_end_date + label: + en: Projected Agreement End Date + fr: Date de fin prévue de l’entente + description: + en: The projected agreement end date is the assumed end of the agreement, or when the project is supposed to end, as captured in the initial agreement. + fr: La date de fin prévue de l'entente est la date de fin présumée de l'entente, ou la date à laquelle le projet est censé prendre fin, conformément à l'entente initiale. + obligation: Optional + format_type: Date (Please format the data as YYYY-MM-DD) + datastore_type: date + form_snippet: scheming/form_snippets/date.html + + # 1.22 Description (English) + - datastore_id: description_en + label: + en: Description (English) + fr: Description (anglais) + description: + en: The description explains why the recipient received funding. It should provide a brief yet accurate description of what the recipient is undertaking. + fr: La description explique à quelles fins le bénéficiaire a reçu le financement. Elle doit décrire de façon brève, mais explicite, en quoi consistent les travaux du bénéficiaire. + obligation: Mandatory + excel_required: true + form_required: true + format_type: Free text + datastore_type: text + form_snippet: scheming/form_snippets/textarea.html + form_attrs: + style: "width: 100%; display: block" + + # 1.23 Description (French) + - datastore_id: description_fr + label: + en: Description (French) + fr: Description (français) + description: + en: The description explains why the recipient received funding. It should provide a brief yet accurate description of what the recipient is undertaking. + fr: La description explique à quelles fins le bénéficiaire a reçu le financement. Elle doit décrire de façon brève, mais explicite, en quoi consistent les travaux du bénéficiaire. + obligation: Mandatory + excel_required: true + form_required: true + format_type: Free text + datastore_type: text + form_snippet: scheming/form_snippets/textarea.html + form_attrs: + style: "width: 100%; display: block" + + # 1.24 Expected Results or Intended Outcome (English) + - datastore_id: expected_results_en + label: + en: Expected Results or Intended Outcome (English) + fr: Résultats attendus ou visés (anglais) + description: + en: The expected results or intended outcome is the assumed result of project completion. It should be populated in accordance with the project that the recipient is undertaking or the program under which it is funded. This field will attempt to explain why the project is being undertaken, and what the final results should be. + fr: Les résultats attendus ou visés sont les résultats présumés qui découlent de l'exécution d'un projet. Le champ doit être rempli en fonction du projet qu'entreprend le bénéficiaire ou conformément au programme en vertu duquel il est financé. Ce champ vise à offrir une description de la raisond'être du projet et de ce que devraient être les résultats finaux. + obligation: Optional + format_type: Free text + datastore_type: text + form_snippet: scheming/form_snippets/textarea.html + form_attrs: + style: "width: 100%; display: block" + + # 1.25 Expected Results or Intended Outcome (French) + - datastore_id: expected_results_fr + label: + en: Expected Results or Intended Outcome (French) + fr: Résultats attendus ou visés (français) + description: + en: The expected results or intended outcome is the assumed result of project completion. It should be populated in accordance with the project that the recipient is undertaking or the program under which it is funded. This field will attempt to explain why the project is being undertaken, and what the final results should be. + fr: Les résultats attendus ou visés sont les résultats présumés qui découlent de l'exécution d'un projet. Le champ doit être rempli en fonction du projet qu'entreprend le bénéficiaire ou conformément au programme en vertu duquel il est financé. Ce champ vise à offrir une description de la raisond'être du projet et de ce que devraient être les résultats finaux. + obligation: Optional + format_type: Free text + datastore_type: text + form_snippet: scheming/form_snippets/textarea.html + form_attrs: + style: "width: 100%; display: block" + + # 1.26 Demographic of the intended beneficiary + - datastore_id: dem_intended_beneficiary + label: + en: Intended Beneficiary demographic group + fr: Groupe démographique des bénéficiaires visés + description: + en: The field indicates whether the intended beneficiaries belong to a specific demographic group. + fr: Le champ indique si les bénéficiaires visés font partie d’un groupe démographique identifié. + obligation: Mandatory + occurrence: Repeatable + excel_required: true + form_required: true + excel_full_text_choices: true + format_type: Controlled List + validation: + en: This field must not be empty. + fr: Ce champ ne doit pas être vide. + datastore_type: _text + form_snippet: scheming/form_snippets/text.html + choice_order_expression: 'value.get("order", False), code' + choices: + Y: + en: Youth + fr: Jeunes + order: 1 + S: + en: Senior + fr: Personnes âgées + order: 2 + D: + en: Persons with disability + fr: Personnes handicappées + order: 3 + I: + en: Indigenous people + fr: Personnes autochtones + order: 4 + V: + en: Visible minority + fr: Minorités visibles + order: 5 + W: + en: Women + fr: Femmes + order: 6 + L: + en: 2SLGBTQI+ + fr: 2ELGBTQI+ + order: 7 + O: + en: Other + fr: Autre + order: 8 + N: + en: None + fr: Aucun + order: 9 + + # 1.27 Other Demographic of intended beneficiary Description (English) + - datastore_id: other_dem_intended_beneficiary_description_en + label: + en: Demographic of intended beneficiary Description (English) + fr: Description du groupe démographique des bénéficiaires visés (anglais) + description: + en: > + This field is mandatory if “Other” is chosen as an + option for the field “Intended Beneficiary demographic + group”. This field has a maximum length of 1800 + characters. This text must be provided in both languages. + fr: > + TBD + Ce champ ne peut excéder une longueur maximale de 1800 + caractères. Ce texte doit être fourni en anglais et en français. + obligation: + en: This field is mandatory if “Other” is chosen as an option for the field “Intended Beneficiary demographic group”. + fr: TBD + excel_required: false + form_required: false + excel_column_width: 80 + validation: + en: This field has a maximum length of 1800 characters. This text must be provided in both languages. + fr: Ce champ ne peut excéder une longueur maximale de 1800 caractères. Ce texte doit être fourni en anglais et en français. + occurrence: Single + format_type: Free text + datastore_type: text + max_chars: 1800 + excel_required_formula: 'OR(TRIM(LEFT({dem_intended_beneficiary},FIND(":",{dem_intended_beneficiary}&":")-1))="O",NOT(ISBLANK({other_dem_intended_beneficiary_description_fr})))' + form_attrs: + style: "width: 100%; display: block" + maxlength: 1800 + + # 1.28 Other Demographic of intended beneficiary Description (French) + - datastore_id: other_dem_intended_beneficiary_description_fr + label: + en: Demographic of intended beneficiary Description (French) + fr: Description du groupe démographique des bénéficiaires visés (français) + description: + en: > + This field is mandatory if “Other” is chosen as an + option for the field “Intended Beneficiary demographic + group”. This field has a maximum length of 1800 + characters. This text must be provided in both languages. + fr: > + TBD + Ce champ ne peut excéder une longueur maximale de 1800 + caractères. Ce texte doit être fourni en anglais et en français. + obligation: + en: This field is mandatory if “Other” is chosen as an option for the field “Intended Beneficiary demographic group”. + fr: TBD + excel_required: false + form_required: false + excel_column_width: 80 + validation: + en: This field has a maximum length of 1800 characters. This text must be provided in both languages. + fr: Ce champ ne peut excéder une longueur maximale de 1800 caractères. Ce texte doit être fourni en anglais et en français. + occurrence: Single + format_type: Free text + datastore_type: text + max_chars: 1800 + excel_required_formula: 'OR(TRIM(LEFT({dem_intended_beneficiary},FIND(":",{dem_intended_beneficiary}&":")-1))="O",NOT(ISBLANK({other_dem_intended_beneficiary_description_en})))' + form_attrs: + style: "width: 100%; display: block" + maxlength: 1800 + + # 1.29 Reason for the amendment + - datastore_id: reason_amendment + label: + en: Reason for the amendment + fr: Raison pour changement + description: + en: The field indicates the reason for the amendment to the project. + fr: Le champ indique la raison pour le changement au projet. + obligation: Mandatory + occurrence: Single + excel_required: true + form_required: true + format_type: Controlled List + validation: + en: This field must not be empty. + fr: Ce champ ne doit pas être vide. + occurrence: Single + datastore_type: text + excel_full_text_choices: true + choice_order_expression: 'value.get("order", False), code' + choices: + S: + en: Change of start date of agreement + fr: Changement de date de debut de l’entente + order: 1 + E: + en: Change of end date of agreement + fr: Changement de date de fin de l’entente + order: 2 + A: + en: Change of amount of agreement + fr: Changement du montant de l’entente + order: 3 + O: + en: Other + fr: Autre + order: 4 + N: + en: No amendment + fr: Pas de changement + order: 5 + + # System fields for audit trail + - datastore_id: record_created + label: Record Creation Time + import_template_include: false + visible_to_public: false + datastore_type: timestamp + preview_class: bg-info + + - datastore_id: record_modified + label: Last Record Modification Time + import_template_include: false + visible_to_public: false + datastore_type: timestamp + preview_class: bg-info + + - datastore_id: user_modified + label: User Last Modified Record + import_template_include: false + visible_to_public: false + datastore_type: text + preview_class: bg-info + + datastore_primary_key: [ref_number, amendment_number] + datastore_indexes: "" + excel_organization_style: + PatternFill: + patternType: solid + fgColor: FFd35c37 + Font: + color: FFFFFF + size: 14 + excel_header_style: + PatternFill: + patternType: solid + fgColor: FFc09a77 + + triggers: + - grantsmonthly_trigger: | + DECLARE + errors text[][] := '{{}}'; + crval RECORD; + BEGIN + errors := errors || required_error(NEW.ref_number, 'ref_number'); + IF NEW.ref_number LIKE '%,%' THEN + errors := errors || ARRAY[['ref_number', {ref_number_error}]]; + END IF; + + errors := errors || required_error(NEW.amendment_number, 'amendment_number'); + IF NEW.amendment_number <> 0 THEN + errors := errors || required_error(NEW.amendment_date, 'amendment_date'); + END IF; + + errors := errors || required_error(NEW.agreement_value, 'agreement_value'); + + errors := errors || required_error(NEW.dem_intended_beneficiary, 'dem_intended_beneficiary'); + crval := choices_clean_error(NEW.dem_intended_beneficiary, {dem_intended_beneficiary}, 'dem_intended_beneficiary'); + errors := errors || crval.error; + NEW.dem_intended_beneficiary := crval.clean; + IF 'O' = ANY(NEW.dem_intended_beneficiary) THEN + errors := errors || conditional_required_error(NEW.other_dem_intended_beneficiary_description_en, 'other_dem_intended_beneficiary_description_en'); + errors := errors || conditional_required_error(NEW.other_dem_intended_beneficiary_description_fr, 'other_dem_intended_beneficiary_description_fr'); + ELSE + errors := errors || both_languages_error(NEW.other_dem_intended_beneficiary_description_en, 'other_dem_intended_beneficiary_description_en', NEW.other_dem_intended_beneficiary_description_fr, 'other_dem_intended_beneficiary_description_fr'); + END IF; + errors := errors || required_error(NEW.reason_amendment, 'reason_amendment'); + errors := errors || choice_error(NEW.reason_amendment, {reason_amendment}, 'reason_amendment'); + + errors := errors || required_error(NEW.agreement_start_date, 'agreement_start_date'); + IF NEW.agreement_start_date >= '2018-04-01'::date THEN + errors := errors || required_error(NEW.agreement_type, 'agreement_type'); + errors := errors || choice_error(NEW.agreement_type, {agreement_type}, 'agreement_type'); + IF NOT ((NEW.recipient_type = '') IS NOT FALSE) THEN + errors := errors || choice_error(NEW.recipient_type, {recipient_type}, 'recipient_type'); + END IF; + errors := errors || required_error(NEW.recipient_legal_name, 'recipient_legal_name'); + errors := errors || required_error(NEW.recipient_country, 'recipient_country'); + errors := errors || choice_error(NEW.recipient_country, {recipient_country}, 'recipient_country'); + IF NEW.recipient_country = 'CA' THEN + errors := errors || required_error(NEW.recipient_province, 'recipient_province'); + errors := errors || choice_error(NEW.recipient_province, {recipient_province}, 'recipient_province'); + END IF; + errors := errors || required_error(NEW.recipient_city, 'recipient_city'); + errors := errors || required_error(NEW.description_en, 'description_en'); + errors := errors || required_error(NEW.description_fr, 'description_fr'); + END IF; + NEW.agreement_value := round(NEW.agreement_value, 2); + + IF errors = '{{}}' THEN + RETURN NEW; + END IF; + RAISE EXCEPTION E'TAB-DELIMITED\t%', array_to_string(errors, E'\t'); + END; + + - update_record_modified_created_trigger + + trigger_strings: # yaml | not supported + ref_number_error: Comma is not allowed in Reference Number field + max_length_error: This field has a maximum length of {} characters. + invalid_choice_error: 'Invalid choice: {}' + conditional_required_error: This field is required due to a response in a different field. + both_lang_error: This text must be provided in both languages + + examples: + record: + ref_number: "001-2018-2019-Q2-00045" + amendment_number: "3" + amendment_date: "2018-04-01" + agreement_type: "G" + recipient_type: "G" + recipient_business_number: "123456789" + recipient_legal_name: "ACME Services Limited|Services ACME Limitée" + recipient_operating_name: "ACME" + recipient_country: "CA" + recipient_province: "ON" + recipient_city: "Grand Falls|Grand-Sault" + recipient_postal_code: "A1A 1A1" + federal_riding_number: "46014" + prog_name_en: "Canada Granting Program" + prog_name_fr: "Le programme de subvention du Canada" + prog_purpose_en: "The Canada Granting Program encourage Canadians to learn about Canada’s geography, history, and economy. The Program provides networking opportunities to enhance recipients’ understanding of Canada." + prog_purpose_fr: "Le programme de subventions du Canada incite les Canadiens à se renseigner sur la géographie, l’histoire et l’économie du Canada. Le programme offre des opportunités de réseautage pour aider les bénéficiaires d’améliorer leur compréhension du Canada." + agreement_number: "F1580-140737" + agreement_value: "500000" + agreement_start_date: "2019-04-01" + agreement_end_date: "2020-04-30" + description_en: "Developing models and other tools to predict the safety performance of buildings." + description_fr: "Met au point des modèles et d'autres outils pour prévoir la sécurité des bâtiments." + expected_results_en: "Develop highly qualified personnel available to pursue various careers within industry, academia, government and other sectors of the economy." + expected_results_fr: "Développé un personnel hautement qualifié prêt à mener une carrière variée au sein de l’industrie, du milieu académique, de la fonction publique ou dans d’autres secteurs de l’économie." + dem_intended_beneficiary: "Y" + reason_amendment: "S" + + filters: + recipient_province: "ON" + filter_one: + ref_number: "001-2018-2019-Q2-00045" + amendment_number: "0" + sort: agreement_date desc diff --git a/ckanext/canada/templates/home/quick_links.html b/ckanext/canada/templates/home/quick_links.html index 50b82f183..d49778b39 100644 --- a/ckanext/canada/templates/home/quick_links.html +++ b/ckanext/canada/templates/home/quick_links.html @@ -139,6 +139,7 @@

{{ _('Proactive Publication') }}

{{ quick_link_pd('contracts') }} {{ quick_link_pd('dac') }} {{ quick_link_pd('grants') }} + {{ quick_link_pd('grantsmonthly') }} {{ quick_link_pd('hospitalityq') }} {{ quick_link_pd('reclassification') }} {{ quick_link_pd('qpnotes') }} diff --git a/ckanext/canada/templates/recombinant/create_pd_record.html b/ckanext/canada/templates/recombinant/create_pd_record.html index d1f8cb04c..88f54d0c1 100644 --- a/ckanext/canada/templates/recombinant/create_pd_record.html +++ b/ckanext/canada/templates/recombinant/create_pd_record.html @@ -66,7 +66,7 @@ 'required': required, 'help_text': description, 'choices': choice_fields[f.datastore_id], - 'sorted_choices': true, + 'sorted_choices': false if f.choice_order_expression else true, 'form_include_blank_choice': true, }, data=data, errors=errors %} {%- else %} diff --git a/ckanext/canada/templates/snippets/cdts/header.html b/ckanext/canada/templates/snippets/cdts/header.html index 955c38ee6..415b39ec3 100644 --- a/ckanext/canada/templates/snippets/cdts/header.html +++ b/ckanext/canada/templates/snippets/cdts/header.html @@ -85,6 +85,10 @@ "subhref": {{ recombinant_menu_link('grants') | tojson }}, "subtext": {{ recombinant_menu_text('grants') | tojson }}, }, + { + "subhref": {{ recombinant_menu_link('grantsmonthly') | tojson }}, + "subtext": {{ recombinant_menu_text('grantsmonthly') | tojson }}, + }, { "subhref": {{ recombinant_menu_link('hospitalityq') | tojson }}, "subtext": {{ recombinant_menu_text('hospitalityq') | tojson }}, From a80a7267381c64dadfb2f34cc776fef71d2de96b Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Tue, 29 Oct 2024 13:49:19 -0400 Subject: [PATCH 02/36] add changelog for PR# 1525 --- changes/1525.feature | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 changes/1525.feature diff --git a/changes/1525.feature b/changes/1525.feature new file mode 100644 index 000000000..802b6bffd --- /dev/null +++ b/changes/1525.feature @@ -0,0 +1,21 @@ +New recombinant PD template for Grants (monthly). This template would be separate from +the existing Grants template and is targeted only for the Staging environment. Major difference +between the two templates are: +* Data collection is done quarterly for Grants vs monthly for Grants (monthly) +* The following fields exist in Grants but deprecated in Grants (monthly): + - 3.9 research_organization_name + - 3.14 federal_riding_name_en + - 3.15 federal_riding_name_fr + - 3.21 agreement_title_en + - 3.22 agreement_title_fr + - 3.25 foreign_currency_type + - 3.26 foreign_currency_value + - 3.29 coverage + - 3.32 naics_identifier + - 3.35 additional_information_en + - 3.36 additional_information_fr +* The following fields are new in the Grants (monthly) template: + - 1.26 dem_intended_beneficiary + - 1.27 other_dem_intended_beneficiary_description_en + - 1.28 other_dem_intended_beneficiary_description_fr + - 1.29 reason_amendment From 8c2c6e93da06e9ebf0ff4ade29d354e214de23aa Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Wed, 30 Oct 2024 09:19:45 -0400 Subject: [PATCH 03/36] change template version and add excel style to grantsmonthly --- changes/1525.feature | 8 +-- ckanext/canada/tables/grantsmonthly.yaml | 73 ++++++++++++++---------- 2 files changed, 47 insertions(+), 34 deletions(-) diff --git a/changes/1525.feature b/changes/1525.feature index 802b6bffd..79e80db61 100644 --- a/changes/1525.feature +++ b/changes/1525.feature @@ -15,7 +15,7 @@ between the two templates are: - 3.35 additional_information_en - 3.36 additional_information_fr * The following fields are new in the Grants (monthly) template: - - 1.26 dem_intended_beneficiary - - 1.27 other_dem_intended_beneficiary_description_en - - 1.28 other_dem_intended_beneficiary_description_fr - - 1.29 reason_amendment + - 3.26 dem_intended_beneficiary + - 3.27 other_dem_intended_beneficiary_description_en + - 3.28 other_dem_intended_beneficiary_description_fr + - 3.29 reason_amendment diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index 165bf1721..324341320 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -4,7 +4,7 @@ title: Proactive Publication - Grants and Contributions (Monthly) shortname: Grants and Contributions (Monthly) notes: Access, upload and modify the Grants and Contributions monthly reports for your organization -template_version: 1 +template_version: 3 template_updated: 2024-10-25 portal_type: info @@ -20,7 +20,7 @@ resources: edit_form: true fields: - # 1.1 Reference Number + # 3.1 Reference Number - datastore_id: ref_number label: en: Reference Number @@ -52,7 +52,7 @@ resources: format_type: Free text datastore_type: text - # 1.2 Amendment Number + # 3.2 Amendment Number - datastore_id: amendment_number label: en: Amendment Number @@ -66,7 +66,7 @@ resources: format_type: Numeric only datastore_type: int - # 1.3 Amendment Date + # 3.3 Amendment Date - datastore_id: amendment_date label: en: Amendment Date @@ -82,7 +82,7 @@ resources: excel_cell_required_formula: 'and({column}{row}="",{column_before}{row}<>0)' form_snippet: scheming/form_snippets/date.html - # 1.4 Agreement Type + # 3.4 Agreement Type - datastore_id: agreement_type label: en: Agreement Type @@ -106,7 +106,7 @@ resources: en: Other transfer payment fr: autre - # 1.5 Recipient Type + # 3.5 Recipient Type - datastore_id: recipient_type label: en: Recipient Type @@ -143,7 +143,7 @@ resources: en: Other fr: autre - # 1.6 Recipient Business Number + # 3.6 Recipient Business Number - datastore_id: recipient_business_number label: en: Recipient Business Number @@ -171,7 +171,7 @@ resources: format_type: Free text datastore_type: text - # 1.7 Recipient Legal Name + # 3.7 Recipient Legal Name - datastore_id: recipient_legal_name label: en: Recipient Legal Name (English|French) @@ -193,7 +193,7 @@ resources: form_attrs: size: 60 - # 1.8 Recipient Operating Name + # 3.8 Recipient Operating Name - datastore_id: recipient_operating_name label: en: Recipient Operating Name (English|French) @@ -212,7 +212,7 @@ resources: form_attrs: size: 60 - # 1.9 Recipient Country + # 3.9 Recipient Country - datastore_id: recipient_country label: en: Recipient Country @@ -227,7 +227,7 @@ resources: datastore_type: text choices_file: choices/country.json - # 1.10 Recipient Province or Territory + # 3.10 Recipient Province or Territory - datastore_id: recipient_province label: en: Recipient Province or Territory @@ -280,7 +280,7 @@ resources: en: Nova Scotia fr: Nouvelle-Écosse - # 1.11 Recipient City + # 3.11 Recipient City - datastore_id: recipient_city label: en: Recipient City (English|French) @@ -306,7 +306,7 @@ resources: form_attrs: size: 60 - # 1.12 Recipient Postal Code + # 3.12 Recipient Postal Code - datastore_id: recipient_postal_code label: en: Recipient Postal Code @@ -324,7 +324,7 @@ resources: format_type: "Text format locked to (X#X #X#)" datastore_type: text - # 1.13 Federal Riding Number + # 3.13 Federal Riding Number - datastore_id: federal_riding_number label: en: Federal Riding Number @@ -336,7 +336,7 @@ resources: format_type: Free text datastore_type: text - # 1.14 Program Name (English) + # 3.14 Program Name (English) - datastore_id: prog_name_en label: en: Program Name (English) @@ -350,7 +350,7 @@ resources: form_attrs: size: 60 - # 1.15 Program Name (French) + # 3.15 Program Name (French) - datastore_id: prog_name_fr label: en: Program Name (French) @@ -364,7 +364,7 @@ resources: form_attrs: size: 60 - # 1.16 Program Purpose (English) + # 3.16 Program Purpose (English) - datastore_id: prog_purpose_en label: en: Program Purpose (English) @@ -379,7 +379,7 @@ resources: form_attrs: style: "width: 100%; display: block" - # 1.17 Program Purpose (French) + # 3.17 Program Purpose (French) - datastore_id: prog_purpose_fr label: en: Program Purpose (French) @@ -394,7 +394,7 @@ resources: form_attrs: style: "width: 100%; display: block" - # 1.18 Agreement Number + # 3.18 Agreement Number - datastore_id: agreement_number label: en: Agreement Number @@ -406,7 +406,7 @@ resources: format_type: Free text datastore_type: text - # 1.19 Agreement Value in CAD + # 3.19 Agreement Value in CAD - datastore_id: agreement_value label: en: Agreement Value in CAD @@ -426,7 +426,7 @@ resources: - 1000000 - 5000000 - # 1.20 Agreement Start Date + # 3.20 Agreement Start Date - datastore_id: agreement_start_date label: en: Agreement Start Date @@ -444,7 +444,7 @@ resources: extract_date_month: true extract_date_clean: true - # 1.21 Projected Agreement End Date + # 3.21 Projected Agreement End Date - datastore_id: agreement_end_date label: en: Projected Agreement End Date @@ -457,7 +457,7 @@ resources: datastore_type: date form_snippet: scheming/form_snippets/date.html - # 1.22 Description (English) + # 3.22 Description (English) - datastore_id: description_en label: en: Description (English) @@ -474,7 +474,7 @@ resources: form_attrs: style: "width: 100%; display: block" - # 1.23 Description (French) + # 3.23 Description (French) - datastore_id: description_fr label: en: Description (French) @@ -491,7 +491,7 @@ resources: form_attrs: style: "width: 100%; display: block" - # 1.24 Expected Results or Intended Outcome (English) + # 3.24 Expected Results or Intended Outcome (English) - datastore_id: expected_results_en label: en: Expected Results or Intended Outcome (English) @@ -506,7 +506,7 @@ resources: form_attrs: style: "width: 100%; display: block" - # 1.25 Expected Results or Intended Outcome (French) + # 3.25 Expected Results or Intended Outcome (French) - datastore_id: expected_results_fr label: en: Expected Results or Intended Outcome (French) @@ -521,7 +521,7 @@ resources: form_attrs: style: "width: 100%; display: block" - # 1.26 Demographic of the intended beneficiary + # 3.26 Demographic of the intended beneficiary - datastore_id: dem_intended_beneficiary label: en: Intended Beneficiary demographic group @@ -579,7 +579,7 @@ resources: fr: Aucun order: 9 - # 1.27 Other Demographic of intended beneficiary Description (English) + # 3.27 Other Demographic of intended beneficiary Description (English) - datastore_id: other_dem_intended_beneficiary_description_en label: en: Demographic of intended beneficiary Description (English) @@ -612,7 +612,7 @@ resources: style: "width: 100%; display: block" maxlength: 1800 - # 1.28 Other Demographic of intended beneficiary Description (French) + # 3.28 Other Demographic of intended beneficiary Description (French) - datastore_id: other_dem_intended_beneficiary_description_fr label: en: Demographic of intended beneficiary Description (French) @@ -645,7 +645,7 @@ resources: style: "width: 100%; display: block" maxlength: 1800 - # 1.29 Reason for the amendment + # 3.29 Reason for the amendment - datastore_id: reason_amendment label: en: Reason for the amendment @@ -825,3 +825,16 @@ resources: ref_number: "001-2018-2019-Q2-00045" amendment_number: "0" sort: agreement_date desc + +excel_edge_style: + PatternFill: + patternType: solid + fgColor: FF024571 +excel_header_style: + PatternFill: + patternType: solid + fgColor: FFEDDB7C +excel_column_heading_style: + PatternFill: + patternType: solid + fgColor: FFEDDB7C From 20e79d7b98c0fab254e538b47fb8303e5d43b077 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Wed, 30 Oct 2024 12:15:32 -0400 Subject: [PATCH 04/36] fix sorting for recombinant update pd record template --- ckanext/canada/templates/recombinant/update_pd_record.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/canada/templates/recombinant/update_pd_record.html b/ckanext/canada/templates/recombinant/update_pd_record.html index 91cc4424c..cffd26da2 100644 --- a/ckanext/canada/templates/recombinant/update_pd_record.html +++ b/ckanext/canada/templates/recombinant/update_pd_record.html @@ -69,7 +69,7 @@ 'required': required, 'help_text': description, 'choices': choice_fields[f.datastore_id], - 'sorted_choices': true, + 'sorted_choices': false if f.choice_order_expression else true, 'form_include_blank_choice': true, }, data=data, errors=errors %} {%- else %} From dc6dc096b74b7688c4a395b6e6af5dc266aa7592 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Thu, 31 Oct 2024 11:29:08 -0400 Subject: [PATCH 05/36] add more choices to fields in grantsmonthly template --- ckanext/canada/tables/grantsmonthly.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index 324341320..5f8dc6e6a 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -533,7 +533,7 @@ resources: occurrence: Repeatable excel_required: true form_required: true - excel_full_text_choices: true + excel_full_text_choices: true format_type: Controlled List validation: en: This field must not be empty. @@ -578,6 +578,14 @@ resources: en: None fr: Aucun order: 9 + U: + en: Not collected + fr: Non collecté + order: 10 + C: + en: Collected but confidential + fr: Collecté mais confidentiel + order: 11 # 3.27 Other Demographic of intended beneficiary Description (English) - datastore_id: other_dem_intended_beneficiary_description_en @@ -599,7 +607,7 @@ resources: fr: TBD excel_required: false form_required: false - excel_column_width: 80 + excel_column_width: 40 validation: en: This field has a maximum length of 1800 characters. This text must be provided in both languages. fr: Ce champ ne peut excéder une longueur maximale de 1800 caractères. Ce texte doit être fourni en anglais et en français. @@ -632,7 +640,7 @@ resources: fr: TBD excel_required: false form_required: false - excel_column_width: 80 + excel_column_width: 40 validation: en: This field has a maximum length of 1800 characters. This text must be provided in both languages. fr: Ce champ ne peut excéder une longueur maximale de 1800 caractères. Ce texte doit être fourni en anglais et en français. @@ -686,6 +694,10 @@ resources: en: No amendment fr: Pas de changement order: 5 + U: + en: Unknown + fr: Inconnu + order: 6 # System fields for audit trail - datastore_id: record_created From 4c1ec0076f82baefea8aed417b7dc11142c88a43 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Mon, 4 Nov 2024 16:04:56 -0500 Subject: [PATCH 06/36] change title for grantsmonthly template and add example for Other field --- ckanext/canada/tables/grantsmonthly.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index 5f8dc6e6a..9e31ed558 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -1,7 +1,7 @@ dataset_type: grantsmonthly target_dataset: grantsmonthly -title: Proactive Publication - Grants and Contributions (Monthly) -shortname: Grants and Contributions (Monthly) +title: Proactive Publication - Grants and Contributions Data Sharing Pilot +shortname: Grants and Contributions Data Sharing Pilot notes: Access, upload and modify the Grants and Contributions monthly reports for your organization template_version: 3 @@ -11,7 +11,7 @@ portal_type: info collection: pd resources: -- title: Proactive Publication - Grants and Contributions (Monthly) +- title: Proactive Publication - Grants and Contributions Data Sharing Pilot resource_name: grantsmonthly published_resource_id: TBD @@ -599,12 +599,13 @@ resources: group”. This field has a maximum length of 1800 characters. This text must be provided in both languages. fr: > - TBD + Ce champ est obligatoire si l'option « Autre » est choisie + pour le champ « Groupe démographique des bénéficiaires visés ». Ce champ ne peut excéder une longueur maximale de 1800 caractères. Ce texte doit être fourni en anglais et en français. obligation: - en: This field is mandatory if “Other” is chosen as an option for the field “Intended Beneficiary demographic group”. - fr: TBD + en: Mandatory if “Other” is chosen as an option for the field “Intended Beneficiary demographic group”. + fr: Obligatoire si l'option « Autre » est choisie pour le champ « Groupe démographique des bénéficiaires visés ». excel_required: false form_required: false excel_column_width: 40 @@ -829,6 +830,8 @@ resources: expected_results_en: "Develop highly qualified personnel available to pursue various careers within industry, academia, government and other sectors of the economy." expected_results_fr: "Développé un personnel hautement qualifié prêt à mener une carrière variée au sein de l’industrie, du milieu académique, de la fonction publique ou dans d’autres secteurs de l’économie." dem_intended_beneficiary: "Y" + other_dem_intended_beneficiary_description_en: "immigrant owned" + other_dem_intended_beneficiary_description_fr: "appartenant à des immigrés" reason_amendment: "S" filters: From 0bf494053802c89cda0b96a75340db71307f8857 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Mon, 4 Nov 2024 16:08:45 -0500 Subject: [PATCH 07/36] update notes for grantsmonthly template --- ckanext/canada/tables/grantsmonthly.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index 9e31ed558..ab8fc0fa7 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -2,7 +2,7 @@ dataset_type: grantsmonthly target_dataset: grantsmonthly title: Proactive Publication - Grants and Contributions Data Sharing Pilot shortname: Grants and Contributions Data Sharing Pilot -notes: Access, upload and modify the Grants and Contributions monthly reports for your organization +notes: Access, upload and modify the Grants and Contributions Data Sharing Pilot reports for your organization template_version: 3 template_updated: 2024-10-25 From 56908ed5daef7022572c6be8f1fad6e8c7a36c04 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Tue, 5 Nov 2024 08:52:31 -0500 Subject: [PATCH 08/36] add translations for grantsmonthly --- ckanext/canada/i18n/ckanext-canada.pot | 151 +++++++++------ .../i18n/en/LC_MESSAGES/ckanext-canada.po | 159 +++++++++------- .../i18n/fr/LC_MESSAGES/ckanext-canada.po | 176 +++++++++++------- 3 files changed, 290 insertions(+), 196 deletions(-) diff --git a/ckanext/canada/i18n/ckanext-canada.pot b/ckanext/canada/i18n/ckanext-canada.pot index 8c411c66b..4583ad29f 100644 --- a/ckanext/canada/i18n/ckanext-canada.pot +++ b/ckanext/canada/i18n/ckanext-canada.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ckanext-canada 0.4.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2024-10-10 13:20+0000\n" +"POT-Creation-Date: 2024-11-04 16:08-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -203,7 +203,7 @@ msgstr "" #: ckanext/canada/templates/admin/publish_search.html:18 #: ckanext/canada/templates/home/quick_links.html:104 #: ckanext/canada/templates/organization/snippets/organization_search.html:7 -#: ckanext/canada/templates/snippets/cdts/header.html:150 +#: ckanext/canada/templates/snippets/cdts/header.html:154 #: ckanext/canada/templates/snippets/search_form.html:44 msgid "Search" msgstr "" @@ -216,62 +216,62 @@ msgstr "" msgid "Unknown Job" msgstr "" -#: ckanext/canada/plugins.py:703 +#: ckanext/canada/plugins.py:704 #: ckanext/canada/templates/scheming/package/snippets/package_form.html:25 msgid "Portal Type" msgstr "" -#: ckanext/canada/plugins.py:704 ckanext/canada/templates/package/deleted.html:14 +#: ckanext/canada/plugins.py:705 ckanext/canada/templates/package/deleted.html:14 #: ckanext/canada/templates/user/new_user_form.html:17 msgid "Organization" msgstr "" -#: ckanext/canada/plugins.py:705 +#: ckanext/canada/plugins.py:706 msgid "Collection Type" msgstr "" -#: ckanext/canada/plugins.py:706 ckanext/canada/plugins.py:707 +#: ckanext/canada/plugins.py:707 ckanext/canada/plugins.py:708 msgid "Keywords" msgstr "" -#: ckanext/canada/plugins.py:708 +#: ckanext/canada/plugins.py:709 msgid "Subject" msgstr "" -#: ckanext/canada/plugins.py:709 +#: ckanext/canada/plugins.py:710 #: ckanext/canada/templates/tabledesigner/view_snippets/cra_business_number.html:1 msgid "Format" msgstr "" -#: ckanext/canada/plugins.py:710 +#: ckanext/canada/plugins.py:711 msgid "Resource Type" msgstr "" -#: ckanext/canada/plugins.py:711 +#: ckanext/canada/plugins.py:712 msgid "Maintenance and Update Frequency" msgstr "" -#: ckanext/canada/plugins.py:712 +#: ckanext/canada/plugins.py:713 msgid "Record Status" msgstr "" -#: ckanext/canada/plugins.py:713 +#: ckanext/canada/plugins.py:714 msgid "IMSO Approval" msgstr "" -#: ckanext/canada/plugins.py:714 +#: ckanext/canada/plugins.py:715 msgid "Jurisdiction" msgstr "" -#: ckanext/canada/plugins.py:715 +#: ckanext/canada/plugins.py:716 msgid "Suggestion Status" msgstr "" -#: ckanext/canada/plugins.py:902 +#: ckanext/canada/plugins.py:903 msgid "Previous" msgstr "" -#: ckanext/canada/plugins.py:902 +#: ckanext/canada/plugins.py:903 msgid "Next" msgstr "" @@ -892,6 +892,7 @@ msgstr "" #. SQL Trigger String for PD Type: adminaircraft #. SQL Trigger String for PD Type: contracts #. SQL Trigger String for PD Type: grants +#. SQL Trigger String for PD Type: grantsmonthly #. SQL Trigger String for PD Type: hospitalityq #. SQL Trigger String for PD Type: qpnotes #. SQL Trigger String for PD Type: reclassification @@ -899,6 +900,7 @@ msgstr "" #. SQL Trigger String for PD Type: wrongdoing #: ckanext/canada/tables/adminaircraft.yaml:316 #: ckanext/canada/tables/contracts.yaml:2185 ckanext/canada/tables/grants.yaml:836 +#: ckanext/canada/tables/grantsmonthly.yaml:799 #: ckanext/canada/tables/hospitalityq.yaml:449 #: ckanext/canada/tables/qpnotes.yaml:332 #: ckanext/canada/tables/reclassification.yaml:271 @@ -1226,6 +1228,53 @@ msgstr "" msgid "Proactive Publication - Grants and Contributions Nothing to Report" msgstr "" +#. Title for PD Type: grantsmonthly +#. Resource Title for PD Type: grantsmonthly +#: ckanext/canada/tables/grantsmonthly.yaml:3 +#: ckanext/canada/tables/grantsmonthly.yaml:14 +msgid "Proactive Publication - Grants and Contributions Data Sharing Pilot" +msgstr "" + +#. Label for PD Type: grantsmonthly +#: ckanext/canada/tables/grantsmonthly.yaml:4 +msgid "Grants and Contributions Data Sharing Pilot" +msgstr "" + +#. Description for PD Type: grantsmonthly +#: ckanext/canada/tables/grantsmonthly.yaml:5 +msgid "" +"Access, upload and modify the Grants and Contributions Data Sharing Pilot " +"reports for your organization" +msgstr "" + +#. SQL Trigger String for PD Type: grantsmonthly +#. SQL Trigger String for PD Type: service +#: ckanext/canada/tables/grantsmonthly.yaml:800 +#: ckanext/canada/tables/service.yaml:1533 ckanext/canada/tables/service.yaml:2346 +msgid "This field has a maximum length of {} characters." +msgstr "" + +#. SQL Trigger String for PD Type: grantsmonthly +#. SQL Trigger String for PD Type: service +#: ckanext/canada/tables/grantsmonthly.yaml:801 +#: ckanext/canada/tables/service.yaml:1534 ckanext/canada/tables/service.yaml:2347 +msgid "Invalid choice: {}" +msgstr "" + +#. SQL Trigger String for PD Type: grantsmonthly +#. SQL Trigger String for PD Type: service +#: ckanext/canada/tables/grantsmonthly.yaml:802 +#: ckanext/canada/tables/service.yaml:1536 ckanext/canada/tables/service.yaml:2350 +msgid "This field is required due to a response in a different field." +msgstr "" + +#. SQL Trigger String for PD Type: grantsmonthly +#. SQL Trigger String for PD Type: service +#: ckanext/canada/tables/grantsmonthly.yaml:803 +#: ckanext/canada/tables/service.yaml:1537 ckanext/canada/tables/service.yaml:2351 +msgid "This text must be provided in both languages" +msgstr "" + #. Title for PD Type: hospitalityq #. Resource Title for PD Type: hospitalityq #: ckanext/canada/tables/hospitalityq.yaml:4 @@ -1345,31 +1394,11 @@ msgstr "" msgid "This field must be either a number, \"NA\", or \"ND\"" msgstr "" -#. SQL Trigger String for PD Type: service -#: ckanext/canada/tables/service.yaml:1533 ckanext/canada/tables/service.yaml:2346 -msgid "This field has a maximum length of {} characters." -msgstr "" - -#. SQL Trigger String for PD Type: service -#: ckanext/canada/tables/service.yaml:1534 ckanext/canada/tables/service.yaml:2347 -msgid "Invalid choice: {}" -msgstr "" - #. SQL Trigger String for PD Type: service #: ckanext/canada/tables/service.yaml:1535 ckanext/canada/tables/service.yaml:2349 msgid "Invalid input syntax for type integer: {}" msgstr "" -#. SQL Trigger String for PD Type: service -#: ckanext/canada/tables/service.yaml:1536 ckanext/canada/tables/service.yaml:2350 -msgid "This field is required due to a response in a different field." -msgstr "" - -#. SQL Trigger String for PD Type: service -#: ckanext/canada/tables/service.yaml:1537 ckanext/canada/tables/service.yaml:2351 -msgid "This text must be provided in both languages" -msgstr "" - #. SQL Constraint Error String for PD Type: service #: ckanext/canada/tables/service.yaml:1346 msgid "" @@ -1838,7 +1867,7 @@ msgid "Load more" msgstr "" #: ckanext/canada/templates/admin/base.html:5 -#: ckanext/canada/templates/snippets/cdts/header.html:197 +#: ckanext/canada/templates/snippets/cdts/header.html:201 msgid "Admin" msgstr "" @@ -2061,14 +2090,14 @@ msgid "Add information about government programs, activities and publications." msgstr "" #: ckanext/canada/templates/home/quick_links.html:91 -#: ckanext/canada/templates/snippets/cdts/header.html:135 +#: ckanext/canada/templates/snippets/cdts/header.html:139 #: ckanext/canada/templates/snippets/dataset_facets.html:4 #: ckanext/canada/templates/snippets/package_item.html:19 msgid "Open Dialogue" msgstr "" #: ckanext/canada/templates/home/quick_links.html:98 -#: ckanext/canada/templates/snippets/cdts/header.html:144 +#: ckanext/canada/templates/snippets/cdts/header.html:148 msgid "Consultations master dataset" msgstr "" @@ -2102,58 +2131,58 @@ msgstr "" msgid "View the list of members linked to your organization." msgstr "" -#: ckanext/canada/templates/home/quick_links.html:151 -#: ckanext/canada/templates/snippets/cdts/header.html:106 +#: ckanext/canada/templates/home/quick_links.html:152 +#: ckanext/canada/templates/snippets/cdts/header.html:110 msgid "Reports Tabled in Parliament" msgstr "" -#: ckanext/canada/templates/home/quick_links.html:152 +#: ckanext/canada/templates/home/quick_links.html:153 msgid "Access, add or modify your reports tabled in Parliament." msgstr "" -#: ckanext/canada/templates/home/quick_links.html:159 +#: ckanext/canada/templates/home/quick_links.html:160 msgid "Briefing packages" msgstr "" -#: ckanext/canada/templates/home/quick_links.html:166 -#: ckanext/canada/templates/snippets/cdts/header.html:118 +#: ckanext/canada/templates/home/quick_links.html:167 +#: ckanext/canada/templates/snippets/cdts/header.html:122 msgid "New or incoming ministers" msgstr "" -#: ckanext/canada/templates/home/quick_links.html:167 +#: ckanext/canada/templates/home/quick_links.html:168 msgid "" "Access, add or modify briefing package information for your new or incoming " "minister." msgstr "" -#: ckanext/canada/templates/home/quick_links.html:174 -#: ckanext/canada/templates/snippets/cdts/header.html:122 +#: ckanext/canada/templates/home/quick_links.html:175 +#: ckanext/canada/templates/snippets/cdts/header.html:126 msgid "New or incoming deputy heads" msgstr "" -#: ckanext/canada/templates/home/quick_links.html:175 +#: ckanext/canada/templates/home/quick_links.html:176 msgid "" "Access, add or modify briefing package information for your new or incoming " "deputy head." msgstr "" -#: ckanext/canada/templates/home/quick_links.html:182 -#: ckanext/canada/templates/snippets/cdts/header.html:126 +#: ckanext/canada/templates/home/quick_links.html:183 +#: ckanext/canada/templates/snippets/cdts/header.html:130 msgid "Parliamentary Committee appearances for ministers" msgstr "" -#: ckanext/canada/templates/home/quick_links.html:183 +#: ckanext/canada/templates/home/quick_links.html:184 msgid "" "Access, add or modify briefing packages for Parliamentary Committee " "appearance for your minister." msgstr "" -#: ckanext/canada/templates/home/quick_links.html:190 -#: ckanext/canada/templates/snippets/cdts/header.html:130 +#: ckanext/canada/templates/home/quick_links.html:191 +#: ckanext/canada/templates/snippets/cdts/header.html:134 msgid "Parliamentary Committee appearances for deputy heads" msgstr "" -#: ckanext/canada/templates/home/quick_links.html:191 +#: ckanext/canada/templates/home/quick_links.html:192 msgid "" "Access, add or modify briefing packages for Parliamentary Committee " "appearance for your deputy head." @@ -2208,7 +2237,7 @@ msgstr "" #: ckanext/canada/templates/organization/index.html:26 #: ckanext/canada/templates/organization/members.html:10 #: ckanext/canada/templates/organization/read_base.html:6 -#: ckanext/canada/templates/snippets/cdts/header.html:154 +#: ckanext/canada/templates/snippets/cdts/header.html:158 #: ckanext/canada/templates/user/read.html:28 #: ckanext/canada/templates/user/read_base.html:99 msgid "Organizations" @@ -3094,11 +3123,11 @@ msgstr "" msgid "Home" msgstr "" -#: ckanext/canada/templates/snippets/cdts/header.html:159 +#: ckanext/canada/templates/snippets/cdts/header.html:163 msgid "FAQ" msgstr "" -#: ckanext/canada/templates/snippets/cdts/header.html:189 +#: ckanext/canada/templates/snippets/cdts/header.html:193 #: ckanext/canada/templates/user/dashboard.html:4 #: ckanext/canada/templates/user/dashboard_datasets.html:15 #: ckanext/canada/templates/user/dashboard_groups.html:9 @@ -3106,15 +3135,15 @@ msgstr "" msgid "Dashboard" msgstr "" -#: ckanext/canada/templates/snippets/cdts/header.html:205 +#: ckanext/canada/templates/snippets/cdts/header.html:209 msgid "Get Help" msgstr "" -#: ckanext/canada/templates/snippets/cdts/header.html:226 +#: ckanext/canada/templates/snippets/cdts/header.html:230 msgid "Signed in as" msgstr "" -#: ckanext/canada/templates/snippets/cdts/header.html:226 +#: ckanext/canada/templates/snippets/cdts/header.html:230 msgid "View profile" msgstr "" diff --git a/ckanext/canada/i18n/en/LC_MESSAGES/ckanext-canada.po b/ckanext/canada/i18n/en/LC_MESSAGES/ckanext-canada.po index 4258c27c4..3de157574 100644 --- a/ckanext/canada/i18n/en/LC_MESSAGES/ckanext-canada.po +++ b/ckanext/canada/i18n/en/LC_MESSAGES/ckanext-canada.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2024-10-10 13:20+0000\n" +"POT-Creation-Date: 2024-11-04 16:08-0500\n" "PO-Revision-Date: 2014-01-23 13:04+0000\n" "Last-Translator: Sean Hammond \n" "Language: en\n" @@ -211,7 +211,7 @@ msgstr "" #: ckanext/canada/templates/admin/publish_search.html:18 #: ckanext/canada/templates/home/quick_links.html:104 #: ckanext/canada/templates/organization/snippets/organization_search.html:7 -#: ckanext/canada/templates/snippets/cdts/header.html:150 +#: ckanext/canada/templates/snippets/cdts/header.html:154 #: ckanext/canada/templates/snippets/search_form.html:44 msgid "Search" msgstr "" @@ -224,63 +224,63 @@ msgstr "" msgid "Unknown Job" msgstr "" -#: ckanext/canada/plugins.py:703 +#: ckanext/canada/plugins.py:704 #: ckanext/canada/templates/scheming/package/snippets/package_form.html:25 msgid "Portal Type" msgstr "" -#: ckanext/canada/plugins.py:704 +#: ckanext/canada/plugins.py:705 #: ckanext/canada/templates/package/deleted.html:14 #: ckanext/canada/templates/user/new_user_form.html:17 msgid "Organization" msgstr "" -#: ckanext/canada/plugins.py:705 +#: ckanext/canada/plugins.py:706 msgid "Collection Type" msgstr "" -#: ckanext/canada/plugins.py:706 ckanext/canada/plugins.py:707 +#: ckanext/canada/plugins.py:707 ckanext/canada/plugins.py:708 msgid "Keywords" msgstr "" -#: ckanext/canada/plugins.py:708 +#: ckanext/canada/plugins.py:709 msgid "Subject" msgstr "" -#: ckanext/canada/plugins.py:709 +#: ckanext/canada/plugins.py:710 #: ckanext/canada/templates/tabledesigner/view_snippets/cra_business_number.html:1 msgid "Format" msgstr "" -#: ckanext/canada/plugins.py:710 +#: ckanext/canada/plugins.py:711 msgid "Resource Type" msgstr "" -#: ckanext/canada/plugins.py:711 +#: ckanext/canada/plugins.py:712 msgid "Maintenance and Update Frequency" msgstr "" -#: ckanext/canada/plugins.py:712 +#: ckanext/canada/plugins.py:713 msgid "Record Status" msgstr "" -#: ckanext/canada/plugins.py:713 +#: ckanext/canada/plugins.py:714 msgid "IMSO Approval" msgstr "" -#: ckanext/canada/plugins.py:714 +#: ckanext/canada/plugins.py:715 msgid "Jurisdiction" msgstr "" -#: ckanext/canada/plugins.py:715 +#: ckanext/canada/plugins.py:716 msgid "Suggestion Status" msgstr "" -#: ckanext/canada/plugins.py:902 +#: ckanext/canada/plugins.py:903 msgid "Previous" msgstr "" -#: ckanext/canada/plugins.py:902 +#: ckanext/canada/plugins.py:903 msgid "Next" msgstr "" @@ -906,6 +906,7 @@ msgstr "" #. SQL Trigger String for PD Type: adminaircraft #. SQL Trigger String for PD Type: contracts #. SQL Trigger String for PD Type: grants +#. SQL Trigger String for PD Type: grantsmonthly #. SQL Trigger String for PD Type: hospitalityq #. SQL Trigger String for PD Type: qpnotes #. SQL Trigger String for PD Type: reclassification @@ -914,6 +915,7 @@ msgstr "" #: ckanext/canada/tables/adminaircraft.yaml:316 #: ckanext/canada/tables/contracts.yaml:2185 #: ckanext/canada/tables/grants.yaml:836 +#: ckanext/canada/tables/grantsmonthly.yaml:799 #: ckanext/canada/tables/hospitalityq.yaml:449 #: ckanext/canada/tables/qpnotes.yaml:332 #: ckanext/canada/tables/reclassification.yaml:271 @@ -1252,6 +1254,57 @@ msgstr "" msgid "Proactive Publication - Grants and Contributions Nothing to Report" msgstr "" +#. Title for PD Type: grantsmonthly +#. Resource Title for PD Type: grantsmonthly +#: ckanext/canada/tables/grantsmonthly.yaml:3 +#: ckanext/canada/tables/grantsmonthly.yaml:14 +msgid "Proactive Publication - Grants and Contributions Data Sharing Pilot" +msgstr "" + +#. Label for PD Type: grantsmonthly +#: ckanext/canada/tables/grantsmonthly.yaml:4 +msgid "Grants and Contributions Data Sharing Pilot" +msgstr "" + +#. Description for PD Type: grantsmonthly +#: ckanext/canada/tables/grantsmonthly.yaml:5 +msgid "" +"Access, upload and modify the Grants and Contributions Data Sharing Pilot" +" reports for your organization" +msgstr "" + +#. SQL Trigger String for PD Type: grantsmonthly +#. SQL Trigger String for PD Type: service +#: ckanext/canada/tables/grantsmonthly.yaml:800 +#: ckanext/canada/tables/service.yaml:1533 +#: ckanext/canada/tables/service.yaml:2346 +msgid "This field has a maximum length of {} characters." +msgstr "" + +#. SQL Trigger String for PD Type: grantsmonthly +#. SQL Trigger String for PD Type: service +#: ckanext/canada/tables/grantsmonthly.yaml:801 +#: ckanext/canada/tables/service.yaml:1534 +#: ckanext/canada/tables/service.yaml:2347 +msgid "Invalid choice: {}" +msgstr "" + +#. SQL Trigger String for PD Type: grantsmonthly +#. SQL Trigger String for PD Type: service +#: ckanext/canada/tables/grantsmonthly.yaml:802 +#: ckanext/canada/tables/service.yaml:1536 +#: ckanext/canada/tables/service.yaml:2350 +msgid "This field is required due to a response in a different field." +msgstr "" + +#. SQL Trigger String for PD Type: grantsmonthly +#. SQL Trigger String for PD Type: service +#: ckanext/canada/tables/grantsmonthly.yaml:803 +#: ckanext/canada/tables/service.yaml:1537 +#: ckanext/canada/tables/service.yaml:2351 +msgid "This text must be provided in both languages" +msgstr "" + #. Title for PD Type: hospitalityq #. Resource Title for PD Type: hospitalityq #: ckanext/canada/tables/hospitalityq.yaml:4 @@ -1372,36 +1425,12 @@ msgstr "" msgid "This field must be either a number, \"NA\", or \"ND\"" msgstr "" -#. SQL Trigger String for PD Type: service -#: ckanext/canada/tables/service.yaml:1533 -#: ckanext/canada/tables/service.yaml:2346 -msgid "This field has a maximum length of {} characters." -msgstr "" - -#. SQL Trigger String for PD Type: service -#: ckanext/canada/tables/service.yaml:1534 -#: ckanext/canada/tables/service.yaml:2347 -msgid "Invalid choice: {}" -msgstr "" - #. SQL Trigger String for PD Type: service #: ckanext/canada/tables/service.yaml:1535 #: ckanext/canada/tables/service.yaml:2349 msgid "Invalid input syntax for type integer: {}" msgstr "" -#. SQL Trigger String for PD Type: service -#: ckanext/canada/tables/service.yaml:1536 -#: ckanext/canada/tables/service.yaml:2350 -msgid "This field is required due to a response in a different field." -msgstr "" - -#. SQL Trigger String for PD Type: service -#: ckanext/canada/tables/service.yaml:1537 -#: ckanext/canada/tables/service.yaml:2351 -msgid "This text must be provided in both languages" -msgstr "" - #. SQL Constraint Error String for PD Type: service #: ckanext/canada/tables/service.yaml:1346 msgid "" @@ -1882,7 +1911,7 @@ msgid "Load more" msgstr "" #: ckanext/canada/templates/admin/base.html:5 -#: ckanext/canada/templates/snippets/cdts/header.html:197 +#: ckanext/canada/templates/snippets/cdts/header.html:201 msgid "Admin" msgstr "" @@ -2110,14 +2139,14 @@ msgid "Add information about government programs, activities and publications." msgstr "" #: ckanext/canada/templates/home/quick_links.html:91 -#: ckanext/canada/templates/snippets/cdts/header.html:135 +#: ckanext/canada/templates/snippets/cdts/header.html:139 #: ckanext/canada/templates/snippets/dataset_facets.html:4 #: ckanext/canada/templates/snippets/package_item.html:19 msgid "Open Dialogue" msgstr "" #: ckanext/canada/templates/home/quick_links.html:98 -#: ckanext/canada/templates/snippets/cdts/header.html:144 +#: ckanext/canada/templates/snippets/cdts/header.html:148 msgid "Consultations master dataset" msgstr "" @@ -2151,58 +2180,58 @@ msgstr "" msgid "View the list of members linked to your organization." msgstr "" -#: ckanext/canada/templates/home/quick_links.html:151 -#: ckanext/canada/templates/snippets/cdts/header.html:106 +#: ckanext/canada/templates/home/quick_links.html:152 +#: ckanext/canada/templates/snippets/cdts/header.html:110 msgid "Reports Tabled in Parliament" msgstr "" -#: ckanext/canada/templates/home/quick_links.html:152 +#: ckanext/canada/templates/home/quick_links.html:153 msgid "Access, add or modify your reports tabled in Parliament." msgstr "" -#: ckanext/canada/templates/home/quick_links.html:159 +#: ckanext/canada/templates/home/quick_links.html:160 msgid "Briefing packages" msgstr "" -#: ckanext/canada/templates/home/quick_links.html:166 -#: ckanext/canada/templates/snippets/cdts/header.html:118 +#: ckanext/canada/templates/home/quick_links.html:167 +#: ckanext/canada/templates/snippets/cdts/header.html:122 msgid "New or incoming ministers" msgstr "" -#: ckanext/canada/templates/home/quick_links.html:167 +#: ckanext/canada/templates/home/quick_links.html:168 msgid "" "Access, add or modify briefing package information for your new or " "incoming minister." msgstr "" -#: ckanext/canada/templates/home/quick_links.html:174 -#: ckanext/canada/templates/snippets/cdts/header.html:122 +#: ckanext/canada/templates/home/quick_links.html:175 +#: ckanext/canada/templates/snippets/cdts/header.html:126 msgid "New or incoming deputy heads" msgstr "" -#: ckanext/canada/templates/home/quick_links.html:175 +#: ckanext/canada/templates/home/quick_links.html:176 msgid "" "Access, add or modify briefing package information for your new or " "incoming deputy head." msgstr "" -#: ckanext/canada/templates/home/quick_links.html:182 -#: ckanext/canada/templates/snippets/cdts/header.html:126 +#: ckanext/canada/templates/home/quick_links.html:183 +#: ckanext/canada/templates/snippets/cdts/header.html:130 msgid "Parliamentary Committee appearances for ministers" msgstr "" -#: ckanext/canada/templates/home/quick_links.html:183 +#: ckanext/canada/templates/home/quick_links.html:184 msgid "" "Access, add or modify briefing packages for Parliamentary Committee " "appearance for your minister." msgstr "" -#: ckanext/canada/templates/home/quick_links.html:190 -#: ckanext/canada/templates/snippets/cdts/header.html:130 +#: ckanext/canada/templates/home/quick_links.html:191 +#: ckanext/canada/templates/snippets/cdts/header.html:134 msgid "Parliamentary Committee appearances for deputy heads" msgstr "" -#: ckanext/canada/templates/home/quick_links.html:191 +#: ckanext/canada/templates/home/quick_links.html:192 msgid "" "Access, add or modify briefing packages for Parliamentary Committee " "appearance for your deputy head." @@ -2257,7 +2286,7 @@ msgstr "" #: ckanext/canada/templates/organization/index.html:26 #: ckanext/canada/templates/organization/members.html:10 #: ckanext/canada/templates/organization/read_base.html:6 -#: ckanext/canada/templates/snippets/cdts/header.html:154 +#: ckanext/canada/templates/snippets/cdts/header.html:158 #: ckanext/canada/templates/user/read.html:28 #: ckanext/canada/templates/user/read_base.html:99 msgid "Organizations" @@ -3165,11 +3194,11 @@ msgstr "" msgid "Home" msgstr "" -#: ckanext/canada/templates/snippets/cdts/header.html:159 +#: ckanext/canada/templates/snippets/cdts/header.html:163 msgid "FAQ" msgstr "" -#: ckanext/canada/templates/snippets/cdts/header.html:189 +#: ckanext/canada/templates/snippets/cdts/header.html:193 #: ckanext/canada/templates/user/dashboard.html:4 #: ckanext/canada/templates/user/dashboard_datasets.html:15 #: ckanext/canada/templates/user/dashboard_groups.html:9 @@ -3177,15 +3206,15 @@ msgstr "" msgid "Dashboard" msgstr "" -#: ckanext/canada/templates/snippets/cdts/header.html:205 +#: ckanext/canada/templates/snippets/cdts/header.html:209 msgid "Get Help" msgstr "" -#: ckanext/canada/templates/snippets/cdts/header.html:226 +#: ckanext/canada/templates/snippets/cdts/header.html:230 msgid "Signed in as" msgstr "" -#: ckanext/canada/templates/snippets/cdts/header.html:226 +#: ckanext/canada/templates/snippets/cdts/header.html:230 msgid "View profile" msgstr "" diff --git a/ckanext/canada/i18n/fr/LC_MESSAGES/ckanext-canada.po b/ckanext/canada/i18n/fr/LC_MESSAGES/ckanext-canada.po index cc9cfe850..81bd92482 100644 --- a/ckanext/canada/i18n/fr/LC_MESSAGES/ckanext-canada.po +++ b/ckanext/canada/i18n/fr/LC_MESSAGES/ckanext-canada.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2024-10-10 13:20+0000\n" +"POT-Creation-Date: 2024-11-04 16:08-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: fr\n" @@ -221,7 +221,7 @@ msgstr "Gouvernement ouvert" #: ckanext/canada/templates/admin/publish_search.html:18 #: ckanext/canada/templates/home/quick_links.html:104 #: ckanext/canada/templates/organization/snippets/organization_search.html:7 -#: ckanext/canada/templates/snippets/cdts/header.html:150 +#: ckanext/canada/templates/snippets/cdts/header.html:154 #: ckanext/canada/templates/snippets/search_form.html:44 msgid "Search" msgstr "Rechercher" @@ -236,63 +236,63 @@ msgstr "" msgid "Unknown Job" msgstr "Tâche inconnue " -#: ckanext/canada/plugins.py:703 +#: ckanext/canada/plugins.py:704 #: ckanext/canada/templates/scheming/package/snippets/package_form.html:25 msgid "Portal Type" msgstr "Type de portail" -#: ckanext/canada/plugins.py:704 +#: ckanext/canada/plugins.py:705 #: ckanext/canada/templates/package/deleted.html:14 #: ckanext/canada/templates/user/new_user_form.html:17 msgid "Organization" msgstr "Organisation" -#: ckanext/canada/plugins.py:705 +#: ckanext/canada/plugins.py:706 msgid "Collection Type" msgstr "Type de collection" -#: ckanext/canada/plugins.py:706 ckanext/canada/plugins.py:707 +#: ckanext/canada/plugins.py:707 ckanext/canada/plugins.py:708 msgid "Keywords" msgstr "Mots clés" -#: ckanext/canada/plugins.py:708 +#: ckanext/canada/plugins.py:709 msgid "Subject" msgstr "Sujet" -#: ckanext/canada/plugins.py:709 +#: ckanext/canada/plugins.py:710 #: ckanext/canada/templates/tabledesigner/view_snippets/cra_business_number.html:1 msgid "Format" msgstr "Format" -#: ckanext/canada/plugins.py:710 +#: ckanext/canada/plugins.py:711 msgid "Resource Type" msgstr "Type de ressource" -#: ckanext/canada/plugins.py:711 +#: ckanext/canada/plugins.py:712 msgid "Maintenance and Update Frequency" msgstr "Fréquence d’entretien et de mise à jour" -#: ckanext/canada/plugins.py:712 +#: ckanext/canada/plugins.py:713 msgid "Record Status" msgstr "État du dossier" -#: ckanext/canada/plugins.py:713 +#: ckanext/canada/plugins.py:714 msgid "IMSO Approval" msgstr "Approbation du CSGI" -#: ckanext/canada/plugins.py:714 +#: ckanext/canada/plugins.py:715 msgid "Jurisdiction" msgstr "Juridiction" -#: ckanext/canada/plugins.py:715 +#: ckanext/canada/plugins.py:716 msgid "Suggestion Status" msgstr "État de la suggestion" -#: ckanext/canada/plugins.py:902 +#: ckanext/canada/plugins.py:903 msgid "Previous" msgstr "Précédent" -#: ckanext/canada/plugins.py:902 +#: ckanext/canada/plugins.py:903 msgid "Next" msgstr "Suivant" @@ -548,9 +548,9 @@ msgid "" "data-target=\"popover\" data-content=\"{}\" data-html=\"true\">Markdown " "formatting here" msgstr "" -"Vous pouvez utiliser le formatage du " -"texte dans Markdown ici" +"Vous pouvez utiliser le formatage du texte dans Markdown ici" #: ckanext/canada/strings.py:67 msgid "" @@ -562,8 +562,8 @@ msgid "" " reasons

" msgstr "" "

__texte en gras__

_texte en italique_

* liste
* " -"d'éléments

1. liste
2. d'éléments
3. numérotés" -"

https://lien.automatique/

[Lien " +"d'éléments

1. liste
2. d'éléments
3. " +"numérotés

https://lien.automatique/

[Lien " "formaté](https://lien.formaté)

> bloc de citation

Remarque : les balises HTML sont supprimées pour des" " raisons de sécurité

" @@ -978,6 +978,7 @@ msgstr "" #. SQL Trigger String for PD Type: adminaircraft #. SQL Trigger String for PD Type: contracts #. SQL Trigger String for PD Type: grants +#. SQL Trigger String for PD Type: grantsmonthly #. SQL Trigger String for PD Type: hospitalityq #. SQL Trigger String for PD Type: qpnotes #. SQL Trigger String for PD Type: reclassification @@ -986,6 +987,7 @@ msgstr "" #: ckanext/canada/tables/adminaircraft.yaml:316 #: ckanext/canada/tables/contracts.yaml:2185 #: ckanext/canada/tables/grants.yaml:836 +#: ckanext/canada/tables/grantsmonthly.yaml:799 #: ckanext/canada/tables/hospitalityq.yaml:449 #: ckanext/canada/tables/qpnotes.yaml:332 #: ckanext/canada/tables/reclassification.yaml:271 @@ -1383,6 +1385,64 @@ msgstr "" "signalerPublication proactive - Subventions et les contributions (Rien à" " signaler)" +#. Title for PD Type: grantsmonthly +#. Resource Title for PD Type: grantsmonthly +#: ckanext/canada/tables/grantsmonthly.yaml:3 +#: ckanext/canada/tables/grantsmonthly.yaml:14 +msgid "Proactive Publication - Grants and Contributions Data Sharing Pilot" +msgstr "" +"Publication proactive – Projet pilote de partage des données sur les " +"subventions et les contributions" + +#. Label for PD Type: grantsmonthly +#: ckanext/canada/tables/grantsmonthly.yaml:4 +msgid "Grants and Contributions Data Sharing Pilot" +msgstr "" +"Projet pilote de partage des données sur les subventions et les " +"contributions" + +#. Description for PD Type: grantsmonthly +#: ckanext/canada/tables/grantsmonthly.yaml:5 +msgid "" +"Access, upload and modify the Grants and Contributions Data Sharing Pilot" +" reports for your organization" +msgstr "" +"Accès, téléversement et modifications des rapports sur les Projet pilote " +"de partage des données sur les subventions et les contributions pour " +"votre organisation" + +#. SQL Trigger String for PD Type: grantsmonthly +#. SQL Trigger String for PD Type: service +#: ckanext/canada/tables/grantsmonthly.yaml:800 +#: ckanext/canada/tables/service.yaml:1533 +#: ckanext/canada/tables/service.yaml:2346 +msgid "This field has a maximum length of {} characters." +msgstr "Ce champ ne peut excéder une longueur maximale de {} caractères." + +#. SQL Trigger String for PD Type: grantsmonthly +#. SQL Trigger String for PD Type: service +#: ckanext/canada/tables/grantsmonthly.yaml:801 +#: ckanext/canada/tables/service.yaml:1534 +#: ckanext/canada/tables/service.yaml:2347 +msgid "Invalid choice: {}" +msgstr "Choix non valide : {}" + +#. SQL Trigger String for PD Type: grantsmonthly +#. SQL Trigger String for PD Type: service +#: ckanext/canada/tables/grantsmonthly.yaml:802 +#: ckanext/canada/tables/service.yaml:1536 +#: ckanext/canada/tables/service.yaml:2350 +msgid "This field is required due to a response in a different field." +msgstr "Ce champ est requis en raison d'une réponse présente dans un autre champ." + +#. SQL Trigger String for PD Type: grantsmonthly +#. SQL Trigger String for PD Type: service +#: ckanext/canada/tables/grantsmonthly.yaml:803 +#: ckanext/canada/tables/service.yaml:1537 +#: ckanext/canada/tables/service.yaml:2351 +msgid "This text must be provided in both languages" +msgstr "Ce texte doit être fourni dans les deux langues" + #. Title for PD Type: hospitalityq #. Resource Title for PD Type: hospitalityq #: ckanext/canada/tables/hospitalityq.yaml:4 @@ -1520,36 +1580,12 @@ msgstr "Information et paramètres sur l’identification des services" msgid "This field must be either a number, \"NA\", or \"ND\"" msgstr "Ce champ doit être un chiffre, \"NA\", ou \"ND\"" -#. SQL Trigger String for PD Type: service -#: ckanext/canada/tables/service.yaml:1533 -#: ckanext/canada/tables/service.yaml:2346 -msgid "This field has a maximum length of {} characters." -msgstr "Ce champ ne peut excéder une longueur maximale de {} caractères." - -#. SQL Trigger String for PD Type: service -#: ckanext/canada/tables/service.yaml:1534 -#: ckanext/canada/tables/service.yaml:2347 -msgid "Invalid choice: {}" -msgstr "Choix non valide : {}" - #. SQL Trigger String for PD Type: service #: ckanext/canada/tables/service.yaml:1535 #: ckanext/canada/tables/service.yaml:2349 msgid "Invalid input syntax for type integer: {}" msgstr "Syntaxe d'entrée invalide pour le type entier : {}" -#. SQL Trigger String for PD Type: service -#: ckanext/canada/tables/service.yaml:1536 -#: ckanext/canada/tables/service.yaml:2350 -msgid "This field is required due to a response in a different field." -msgstr "Ce champ est requis en raison d'une réponse présente dans un autre champ." - -#. SQL Trigger String for PD Type: service -#: ckanext/canada/tables/service.yaml:1537 -#: ckanext/canada/tables/service.yaml:2351 -msgid "This text must be provided in both languages" -msgstr "Ce texte doit être fourni dans les deux langues" - #. SQL Constraint Error String for PD Type: service #: ckanext/canada/tables/service.yaml:1346 msgid "" @@ -2164,7 +2200,7 @@ msgid "Load more" msgstr "En charger davantage" #: ckanext/canada/templates/admin/base.html:5 -#: ckanext/canada/templates/snippets/cdts/header.html:197 +#: ckanext/canada/templates/snippets/cdts/header.html:201 msgid "Admin" msgstr "Administrateur" @@ -2421,14 +2457,14 @@ msgstr "" " gouvernement." #: ckanext/canada/templates/home/quick_links.html:91 -#: ckanext/canada/templates/snippets/cdts/header.html:135 +#: ckanext/canada/templates/snippets/cdts/header.html:139 #: ckanext/canada/templates/snippets/dataset_facets.html:4 #: ckanext/canada/templates/snippets/package_item.html:19 msgid "Open Dialogue" msgstr "Dialogue ouvert" #: ckanext/canada/templates/home/quick_links.html:98 -#: ckanext/canada/templates/snippets/cdts/header.html:144 +#: ckanext/canada/templates/snippets/cdts/header.html:148 msgid "Consultations master dataset" msgstr "Données de consultations principals" @@ -2466,27 +2502,27 @@ msgstr "Voir les members liés à votre organisation" msgid "View the list of members linked to your organization." msgstr "Voir la liste des membres liés à votre organisation." -#: ckanext/canada/templates/home/quick_links.html:151 -#: ckanext/canada/templates/snippets/cdts/header.html:106 +#: ckanext/canada/templates/home/quick_links.html:152 +#: ckanext/canada/templates/snippets/cdts/header.html:110 msgid "Reports Tabled in Parliament" msgstr "Rapports déposés au Parlement" -#: ckanext/canada/templates/home/quick_links.html:152 +#: ckanext/canada/templates/home/quick_links.html:153 msgid "Access, add or modify your reports tabled in Parliament." msgstr "" "Consultez vos rapports déposés au Parlement, ajoutez-y du contenu ou " "modifiez-les." -#: ckanext/canada/templates/home/quick_links.html:159 +#: ckanext/canada/templates/home/quick_links.html:160 msgid "Briefing packages" msgstr "Documents d’information" -#: ckanext/canada/templates/home/quick_links.html:166 -#: ckanext/canada/templates/snippets/cdts/header.html:118 +#: ckanext/canada/templates/home/quick_links.html:167 +#: ckanext/canada/templates/snippets/cdts/header.html:122 msgid "New or incoming ministers" msgstr "Documents d’information pour les nouveaux ministres" -#: ckanext/canada/templates/home/quick_links.html:167 +#: ckanext/canada/templates/home/quick_links.html:168 msgid "" "Access, add or modify briefing package information for your new or " "incoming minister." @@ -2494,12 +2530,12 @@ msgstr "" "Consultez la trousse d’information pour le nouveau ministre, ajoutez-y du" " contenu ou modifiez-la." -#: ckanext/canada/templates/home/quick_links.html:174 -#: ckanext/canada/templates/snippets/cdts/header.html:122 +#: ckanext/canada/templates/home/quick_links.html:175 +#: ckanext/canada/templates/snippets/cdts/header.html:126 msgid "New or incoming deputy heads" msgstr "Documents d’information pour les nouveaux administrateurs généraux" -#: ckanext/canada/templates/home/quick_links.html:175 +#: ckanext/canada/templates/home/quick_links.html:176 msgid "" "Access, add or modify briefing package information for your new or " "incoming deputy head." @@ -2507,14 +2543,14 @@ msgstr "" "Consultez la trousse d’information pour le nouvel administrateur général," " ajoutez-y du contenu ou modifiez-la." -#: ckanext/canada/templates/home/quick_links.html:182 -#: ckanext/canada/templates/snippets/cdts/header.html:126 +#: ckanext/canada/templates/home/quick_links.html:183 +#: ckanext/canada/templates/snippets/cdts/header.html:130 msgid "Parliamentary Committee appearances for ministers" msgstr "" "Documents d’information à l’intention des ministres pour les comparutions" " devant un comité parlementaire" -#: ckanext/canada/templates/home/quick_links.html:183 +#: ckanext/canada/templates/home/quick_links.html:184 msgid "" "Access, add or modify briefing packages for Parliamentary Committee " "appearance for your minister." @@ -2522,14 +2558,14 @@ msgstr "" "Consultez la trousse d’information pour la comparution de votre ministre " "devant un comité parlementaire, ajoutez-y du contenu ou modifiez-la." -#: ckanext/canada/templates/home/quick_links.html:190 -#: ckanext/canada/templates/snippets/cdts/header.html:130 +#: ckanext/canada/templates/home/quick_links.html:191 +#: ckanext/canada/templates/snippets/cdts/header.html:134 msgid "Parliamentary Committee appearances for deputy heads" msgstr "" "Documents d’information à l’intention des administrateurs généraux pour " "les comparutions devant un comité parlementaire" -#: ckanext/canada/templates/home/quick_links.html:191 +#: ckanext/canada/templates/home/quick_links.html:192 msgid "" "Access, add or modify briefing packages for Parliamentary Committee " "appearance for your deputy head." @@ -2587,7 +2623,7 @@ msgstr "Pourquoi ne pas en créer une?" #: ckanext/canada/templates/organization/index.html:26 #: ckanext/canada/templates/organization/members.html:10 #: ckanext/canada/templates/organization/read_base.html:6 -#: ckanext/canada/templates/snippets/cdts/header.html:154 +#: ckanext/canada/templates/snippets/cdts/header.html:158 #: ckanext/canada/templates/user/read.html:28 #: ckanext/canada/templates/user/read_base.html:99 msgid "Organizations" @@ -3621,11 +3657,11 @@ msgstr "{actor} a ajouté le {view_type} de l'affichage {view}" msgid "Home" msgstr "Accueil" -#: ckanext/canada/templates/snippets/cdts/header.html:159 +#: ckanext/canada/templates/snippets/cdts/header.html:163 msgid "FAQ" msgstr "FAQ" -#: ckanext/canada/templates/snippets/cdts/header.html:189 +#: ckanext/canada/templates/snippets/cdts/header.html:193 #: ckanext/canada/templates/user/dashboard.html:4 #: ckanext/canada/templates/user/dashboard_datasets.html:15 #: ckanext/canada/templates/user/dashboard_groups.html:9 @@ -3633,15 +3669,15 @@ msgstr "FAQ" msgid "Dashboard" msgstr "Tableau de bord" -#: ckanext/canada/templates/snippets/cdts/header.html:205 +#: ckanext/canada/templates/snippets/cdts/header.html:209 msgid "Get Help" msgstr "Obtenez de l’aide" -#: ckanext/canada/templates/snippets/cdts/header.html:226 +#: ckanext/canada/templates/snippets/cdts/header.html:230 msgid "Signed in as" msgstr "Connecté en tant que" -#: ckanext/canada/templates/snippets/cdts/header.html:226 +#: ckanext/canada/templates/snippets/cdts/header.html:230 msgid "View profile" msgstr "Afficher le profil" From b23f76b33c85f56cb2165aa19df9fdb56bb2befd Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Tue, 5 Nov 2024 10:10:02 -0500 Subject: [PATCH 09/36] add translation for other_dem_intended_beneficiary_description_fr field in grantsmonthly --- ckanext/canada/tables/grantsmonthly.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index ab8fc0fa7..d98de8ea1 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -633,12 +633,13 @@ resources: group”. This field has a maximum length of 1800 characters. This text must be provided in both languages. fr: > - TBD + Ce champ est obligatoire si l'option « Autre » est choisie + pour le champ « Groupe démographique des bénéficiaires visés ». Ce champ ne peut excéder une longueur maximale de 1800 caractères. Ce texte doit être fourni en anglais et en français. obligation: - en: This field is mandatory if “Other” is chosen as an option for the field “Intended Beneficiary demographic group”. - fr: TBD + en: Mandatory if “Other” is chosen as an option for the field “Intended Beneficiary demographic group”. + fr: Obligatoire si l'option « Autre » est choisie pour le champ « Groupe démographique des bénéficiaires visés ». excel_required: false form_required: false excel_column_width: 40 From e42e12955df55a824908b7503a54e84bcd2e3a20 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Thu, 14 Nov 2024 16:39:14 -0500 Subject: [PATCH 10/36] add field rating_risk to grantsmonthly template --- ckanext/canada/tables/grantsmonthly.yaml | 80 +++++++++++++++++++++++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index d98de8ea1..9ed03423b 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -671,7 +671,6 @@ resources: validation: en: This field must not be empty. fr: Ce champ ne doit pas être vide. - occurrence: Single datastore_type: text excel_full_text_choices: true choice_order_expression: 'value.get("order", False), code' @@ -701,6 +700,82 @@ resources: fr: Inconnu order: 6 + # 3.30 Risk rating + - datastore_id: rating_risk + label: + en: Risk rating + fr: Evaluation du risque + description: + en: > + The field indicates the risk rating for the + organization as determined by the department. + A Low rating suggests the department has identified + minimal risk in funding this recipient, indicating strong + financial stability, compliance history, and organizational + capacity. The recipient is considered trustworthy in terms + of their ability to manage the funds and achieve the + intended outcomes. + A Medium rating suggests the department has identified a + moderate level of risk, where additional monitoring or + support may be needed to ensure compliance and program success. + A High rating suggests the department has identified a + substantial level of risk, with significant concerns regarding + the recipient's financial situation, organizational capacity, + and compliance with previous agreement. As a result, intensive + oversight or specific conditions may be necessary to mitigate + potential issues. + fr: > + Le champ indique l'évaluation du risque pour l'organisation + telle qu'elle a été déterminée par le département. + Une évaluation faible suggère que le département a identifié + un risque minimal dans le financement de ce bénéficiaire, + indiquant une forte stabilité financière, des antécédents + de conformité et une capacité organisationnelle. Le bénéficiaire + est considéré comme digne de confiance en ce qui concerne sa + capacité à gérer les fonds et à atteindre les résultats escomptés. + Une évaluation moyenne indique que le département a identifié un + niveau de risque modéré, pour lequel un suivi ou un soutien + supplémentaire peut être nécessaire afin de garantir la conformité + et la réussite du programme. + Une évaluation élevée indique que le département a identifié un + niveau de risque substantiel, avec des préoccupations importantes + concernant la situation financière du bénéficiaire, sa capacite + organisationnelle et sa conformité aux accords précédents. En + conséquence, une surveillance intensive ou des conditions + spécifiques peuvent nécessiter pour atténuer les problèmes potentiels. + obligation: Mandatory + occurrence: Single + excel_required: true + form_required: true + format_type: Controlled List + validation: + en: This field must not be empty. + fr: Ce champ ne doit pas être vide. + datastore_type: text + excel_full_text_choices: true + choice_order_expression: 'value.get("order", False), code' + choices: + L: + en: Low + fr: Faible + order: 1 + M: + en: Medium + fr: Moyen + order: 2 + H: + en: High + fr: Élevé + order: 3 + N: + en: No rating available + fr: Pas d'évaluation disponible + order: 4 + C: + en: Confidential + fr: Confidentiel + order: 5 + # System fields for audit trail - datastore_id: record_created label: Record Creation Time @@ -767,6 +842,8 @@ resources: END IF; errors := errors || required_error(NEW.reason_amendment, 'reason_amendment'); errors := errors || choice_error(NEW.reason_amendment, {reason_amendment}, 'reason_amendment'); + errors := errors || required_error(NEW.rating_risk, 'rating_risk'); + errors := errors || choice_error(NEW.rating_risk, {rating_risk}, 'rating_risk'); errors := errors || required_error(NEW.agreement_start_date, 'agreement_start_date'); IF NEW.agreement_start_date >= '2018-04-01'::date THEN @@ -834,6 +911,7 @@ resources: other_dem_intended_beneficiary_description_en: "immigrant owned" other_dem_intended_beneficiary_description_fr: "appartenant à des immigrés" reason_amendment: "S" + rating_risk: "L" filters: recipient_province: "ON" From f997c28ead67e0579325fe093e70ec21e178708e Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Fri, 15 Nov 2024 11:23:06 -0500 Subject: [PATCH 11/36] format description for risk rating field in grants monthly template --- ckanext/canada/tables/grantsmonthly.yaml | 53 +++++++----------------- 1 file changed, 16 insertions(+), 37 deletions(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index 9ed03423b..439bcb20c 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -706,43 +706,22 @@ resources: en: Risk rating fr: Evaluation du risque description: - en: > - The field indicates the risk rating for the - organization as determined by the department. - A Low rating suggests the department has identified - minimal risk in funding this recipient, indicating strong - financial stability, compliance history, and organizational - capacity. The recipient is considered trustworthy in terms - of their ability to manage the funds and achieve the - intended outcomes. - A Medium rating suggests the department has identified a - moderate level of risk, where additional monitoring or - support may be needed to ensure compliance and program success. - A High rating suggests the department has identified a - substantial level of risk, with significant concerns regarding - the recipient's financial situation, organizational capacity, - and compliance with previous agreement. As a result, intensive - oversight or specific conditions may be necessary to mitigate - potential issues. - fr: > - Le champ indique l'évaluation du risque pour l'organisation - telle qu'elle a été déterminée par le département. - Une évaluation faible suggère que le département a identifié - un risque minimal dans le financement de ce bénéficiaire, - indiquant une forte stabilité financière, des antécédents - de conformité et une capacité organisationnelle. Le bénéficiaire - est considéré comme digne de confiance en ce qui concerne sa - capacité à gérer les fonds et à atteindre les résultats escomptés. - Une évaluation moyenne indique que le département a identifié un - niveau de risque modéré, pour lequel un suivi ou un soutien - supplémentaire peut être nécessaire afin de garantir la conformité - et la réussite du programme. - Une évaluation élevée indique que le département a identifié un - niveau de risque substantiel, avec des préoccupations importantes - concernant la situation financière du bénéficiaire, sa capacite - organisationnelle et sa conformité aux accords précédents. En - conséquence, une surveillance intensive ou des conditions - spécifiques peuvent nécessiter pour atténuer les problèmes potentiels. + en: | + The field indicates the risk rating for the organization as determined by the department. + + A “Low” rating suggests the department has identified minimal risk in funding this recipient, indicating strong financial stability, compliance history, and organizational capacity. The recipient is considered trustworthy in terms of their ability to manage the funds and achieve the intended outcomes. + + A “Medium” rating suggests the department has identified a moderate level of risk, where additional monitoring or support may be needed to ensure compliance and program success. + + A “High” rating suggests the department has identified a substantial level of risk, with significant concerns regarding the recipient's financial situation, organizational capacity, and compliance with previous agreement. As a result, intensive oversight or specific conditions may be necessary to mitigate potential issues. + fr: | + Le champ indique l'évaluation du risque pour l'organisation telle qu'elle a été déterminée par le département. + + Une évaluation « faible » suggère que le département a identifié un risque minimal dans le financement de ce bénéficiaire, indiquant une forte stabilité financière, des antécédents de conformité et une capacité organisationnelle. Le bénéficiaire est considéré comme digne de confiance en ce qui concerne sa capacité à gérer les fonds et à atteindre les résultats escomptés. + + Une évaluation « moyenne » indique que le département a identifié un niveau de risque modéré, pour lequel un suivi ou un soutien supplémentaire peut être nécessaire afin de garantir la conformité et la réussite du programme. + + Une évaluation « élevée » indique que le département a identifié un niveau de risque substantiel, avec des préoccupations importantes concernant la situation financière du bénéficiaire, sa capacite organisationnelle et sa conformité aux accords précédents. En conséquence, une surveillance intensive ou des conditions spécifiques peuvent nécessiter pour atténuer les problèmes potentiels. obligation: Mandatory occurrence: Single excel_required: true From 4330fa2280996a9c5d8b28dec10fc8a7ddc75c44 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Wed, 12 Feb 2025 13:12:24 -0500 Subject: [PATCH 12/36] add grants-monthly to makefile --- bin/pd/Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/bin/pd/Makefile b/bin/pd/Makefile index 6547aeeb5..7a912185a 100644 --- a/bin/pd/Makefile +++ b/bin/pd/Makefile @@ -12,7 +12,7 @@ csv_files := \ consultations.csv \ dac.csv \ experiment.csv \ - grants.csv grants-nil.csv \ + grants.csv grants-nil.csv grantsmonthly.csv \ hospitalityq.csv hospitalityq-nil.csv \ nap5.csv \ reclassification.csv reclassification-nil.csv \ @@ -413,9 +413,12 @@ upload-grants: $(workdir)/filtered/grants.csv $(workdir)/filtered/grants-nil.csv @$(ckanapi) action resource_patch -c $(registry_ini) \ id=4e4db232-f5e8-43c7-b8b2-439eb7d55475 upload@"$(workdir)/filtered/grants-nil.csv" \ > /dev/null + @$(ckanapi) action resource_patch -c $(registry_ini) \ + id=a4fa27d7-0c7c-4e31-bc0a-2d1cf249f749 upload@"$(workdir)/filtered/grantsmonthly.csv" \ + > /dev/null .PHONY: rebuild-grants -rebuild-grants: $(workdir)/filtered/grants.csv $(workdir)/filtered/grants-nil.csv +rebuild-grants: $(workdir)/filtered/grants.csv $(workdir)/filtered/grants-nil.csv $(workdir)/filtered/grantsmonthly.csv @$(echo_date) Rebuilding Grants and Contributions... mkdir -p $(workdir)/amendments $(registry_python) $(fdir)/amendment_delta_records.py \ @@ -429,12 +432,18 @@ $(workdir)/grants.csv: $(workdir)/grants-nil.csv: $(ckan_command) -c $(registry_ini) $(combine) grants-nil -d $(workdir) +$(workdir)/grantsmonthly.csv: + $(ckan_command) -c $(registry_ini) $(combine) grantsmonthly -d $(workdir) + $(workdir)/filtered/grants.csv: $(workdir)/grants.csv $(fdir)/filter_grants.py < $< > $@ $(workdir)/filtered/grants-nil.csv: $(workdir)/grants-nil.csv $(fdir)/filter_grants.py < $< > $@ +$(workdir)/filtered/grantsmonthly.csv: $(workdir)/grantsmonthly.csv + $(fdir)/filter_grants_monthly.py < $< > $@ + ### ### Hospitality Expenses ### From 0f56810fb745d37a58806a6b2ad0ef6ee4cd7e68 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Thu, 13 Feb 2025 14:12:12 -0500 Subject: [PATCH 13/36] change quarterly to monthly for grants-monthly table --- ckanext/canada/tables/grantsmonthly.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index 439bcb20c..474f7c565 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -29,23 +29,23 @@ resources: en: | The Reference number is populated by departments. It is a unique reference number given to each entry. Having a unique identifier for each item will allow departments to locate a specific item in the registry should they need to modify or delete. - Controlled format; This field is populated in the following format DDD-YYYY-YYYY-QX-XXXXX + Controlled format; This field is populated in the following format DDD-YYYY-YYYY-MX-XXXXX 1. DDD represents the department number – See annex A for list of department numbers 2. YYYY-YYYY represents the fiscal year - 3. QX represents the fiscal quarter + 3. MX represents the fiscal month 4. XXXXX represents the unique number assigned by the department for each entry. - For example, entries in the 2018-2019 Q1 fiscal year should be assigned numbers as follows: 001-2018-2019-Q1-00001, 001-2018-2019-Q1-00002, 001-2018-2019-Q1-00003, etc.' + For example, entries in the 2018-2019 M1 fiscal year should be assigned numbers as follows: 001-2018-2019-M1-00001, 001-2018-2019-M1-00002, 001-2018-2019-M1-00003, etc.' fr: | Ce champ est rempli par l’utilisateur. L’identificateur de projet ministériel permet aux ministères d’identifier rapidement les rapports produits dans leur propre système. Les ministères devraient utiliser un chiffre qui est logique pour le ministère. Ces renseignements seront publiés dans le cadre du rapport. - Format contrôlé; Ce champ est rempli au format suivant: DDD-YYYY-YYYY-QX-XXXXX + Format contrôlé; Ce champ est rempli au format suivant: DDD-YYYY-YYYY-MX-XXXXX 1. DDD représente le numéro de département - Voir l’annexe A pour la liste des numéros de département. 2. AAAA-AAAA représente l'année fiscale - 3. QX représente le trimestre fiscal + 3. MX représente le mois fiscal 4. XXXXX représente le numéro unique attribué par le département pour chaque entrée. - Par exemple, les numéros de l'exercice 2018-2019 du T1 devraient recevoir les numéros suivants: 001-2018-2019-Q1-00001, 001-2018-2019-Q1-00002, 001-2018-2019-Q1-00003, etc.' + Par exemple, les numéros de l'exercice 2018-2019 du T1 devraient recevoir les numéros suivants: 001-2018-2019-M1-00001, 001-2018-2019-M1-00002, 001-2018-2019-M1-00003, etc.' obligation: Mandatory excel_required: true form_required: true @@ -861,7 +861,7 @@ resources: examples: record: - ref_number: "001-2018-2019-Q2-00045" + ref_number: "001-2018-2019-M2-00045" amendment_number: "3" amendment_date: "2018-04-01" agreement_type: "G" @@ -895,7 +895,7 @@ resources: filters: recipient_province: "ON" filter_one: - ref_number: "001-2018-2019-Q2-00045" + ref_number: "001-2018-2019-M2-00045" amendment_number: "0" sort: agreement_date desc From e96341665c3209014c9f32e5c12846802a72146d Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Thu, 13 Feb 2025 15:35:48 -0500 Subject: [PATCH 14/36] remove plugins.py from grants-monthly --- ckanext/canada/plugins.py | 942 -------------------------------------- 1 file changed, 942 deletions(-) delete mode 100755 ckanext/canada/plugins.py diff --git a/ckanext/canada/plugins.py b/ckanext/canada/plugins.py deleted file mode 100755 index 88bb314a4..000000000 --- a/ckanext/canada/plugins.py +++ /dev/null @@ -1,942 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -import logging -import re -from flask import has_request_context -import ckan.plugins as p -from ckan.lib.plugins import DefaultDatasetForm, DefaultTranslation -import ckan.lib.helpers as hlp -from ckan.logic import validators as logic_validators -from ckanext.datastore.interfaces import IDataDictionaryForm - -from ckan.lib.app_globals import set_app_global -from ckan.plugins.core import plugin_loaded - -from ckan.plugins.toolkit import ( - g, - h, - chained_action, - ValidationError, - ObjectNotFound, - _, - get_validator, - request -) - -from ckanext.canada import validators -from ckanext.canada import logic -from ckanext.canada import auth -from ckanext.canada import helpers -from ckanext.canada import cli -from ckanext.canada.pd import get_commands as get_pd_commands -from ckanext.canada import activity as act -# type_ignore_reason: importing to proc decorators -from ckanext.canada import checks # type: ignore -from ckanext.canada import column_types as coltypes -from ckanext.tabledesigner.interfaces import IColumnTypes -from ckanext.xloader.interfaces import IXloader -import json - -import ckan.lib.formatters as formatters -from flask import Blueprint -from ckanext.scheming.plugins import SchemingDatasetsPlugin -from ckanext.security.plugin import CkanSecurityPlugin -from ckanext.canada.view import ( - canada_views, - CanadaDatasetEditView, - CanadaDatasetCreateView, - CanadaResourceEditView, - CanadaResourceCreateView, - canada_search, - canada_prevent_pd_views, - _get_package_type_from_dict -) - -# XXX Monkey patch to work around libcloud/azure 400 error on get_container -try: - import libcloud.common.azure - libcloud.common.azure.API_VERSION = '2014-02-14' -except ImportError: - pass - -log = logging.getLogger(__name__) -fq_portal_release_date_match = re.compile(r"(portal_release_date:\"\[.*\]\")") - - -class CanadaThemePlugin(p.SingletonPlugin): - - p.implements(p.IConfigurer) - p.implements(p.ITemplateHelpers) - - # IConfigurer - def update_config(self, config): - p.toolkit.add_template_directory(config, 'templates') - p.toolkit.add_public_directory(config, 'public') - p.toolkit.add_resource('public/static/js', 'js') - p.toolkit.add_resource('assets/internal', 'canada_internal') - p.toolkit.add_resource('assets/datatables', 'canada_datatables') - p.toolkit.add_resource('assets/public', 'canada_public') - p.toolkit.add_resource('assets/invitation-manager', 'invitation_manager') - set_app_global('is_registry', plugin_loaded('canada_internal')) - - config['ckan.favicon'] = helpers.cdts_asset('/assets/favicon.ico') - - # ITemplateHelpers - def get_helpers(self): - return dict((h, getattr(helpers, h)) for h in [ - # Registry - 'may_publish_datasets', - 'today', - 'date_format', - 'parse_release_date_facet', - 'is_ready_to_publish', - 'get_datapreview_recombinant', - 'recombinant_description_to_markup', - 'mail_to_with_params', - 'get_timeout_length', - 'canada_check_access', - 'get_user_email', - 'get_loader_status_badge', - 'is_user_locked', - # Portal - 'user_organizations', - 'openness_score', - 'remove_duplicates', - 'get_license', - 'normalize_strip_accents', - 'portal_url', - 'adv_search_url', - 'adv_search_mlt_root', - 'ga4_id', - 'loop11_key', - 'drupal_session_present', - 'contact_information', - 'show_openinfo_facets', - 'json_loads', - 'catalogue_last_update_date', - 'get_translated_t', - 'language_text_t', - 'get_datapreview', - 'iso_to_goctime', - 'geojson_to_wkt', - 'cdts_asset', - 'get_map_type', - 'adobe_analytics_login_required', - 'adobe_analytics_lang', - 'adobe_analytics_js', - 'mail_to_with_params', - 'organization_member_count', - 'flash_notice', - 'flash_error', - 'flash_success', - 'adobe_analytics_creator', - 'resource_view_meta_title', - 'get_resource_view', - 'resource_view_type', - 'fgp_viewer_url', - 'date_field', - 'split_piped_bilingual_field', - 'search_filter_pill_link_label', - 'release_date_facet_start_year', - 'ckan_to_cdts_breadcrumbs', - 'operations_guide_link', - 'max_resources_per_dataset', - ]) - - -class CanadaSecurityPlugin(CkanSecurityPlugin): - """ - Plugin for extra security - """ - p.implements(p.IResourceController, inherit=True) - p.implements(p.IValidators, inherit=True) - p.implements(p.IConfigurer) - - def update_config(self, config): - super(CanadaSecurityPlugin, self).update_config(config) - # Disable auth settings - config['ckan.auth.anon_create_dataset'] = False - config['ckan.auth.create_unowned_dataset'] = False - config['ckan.auth.create_dataset_if_not_in_organization'] = False - config['ckan.auth.user_create_groups'] = False - config['ckan.auth.user_create_organizations'] = False - config['ckan.auth.create_user_via_api'] = config.get('ckan.auth.create_user_via_api', False) # allow setting in INI file - # Enable auth settings - config['ckan.auth.user_delete_groups'] = True - config['ckan.auth.user_delete_organizations'] = True - config['ckan.auth.create_user_via_web'] = plugin_loaded('canada_internal') # /user/register view only on registry - # Set auth settings - config['ckan.auth.roles_that_cascade_to_sub_groups'] = 'admin' - - def before_create(self, context, resource): - """ - Override before_create from CkanSecurityPlugin. - Want to use the methods in scheming instead of before_create. - """ - - def before_update(self, context, current, resource): - """ - Override before_update from CkanSecurityPlugin. - Want to use the methods in scheming instead of before_update. - """ - - def get_validators(self): - validators_dict = super(CanadaSecurityPlugin, self).get_validators() or {} - return dict( - validators_dict, - canada_security_upload_type=validators.canada_security_upload_type, - canada_security_upload_presence=validators.canada_security_upload_presence, - ) - - -class CanadaDatasetsPlugin(SchemingDatasetsPlugin): - """ - Plugin for dataset and resource - """ - p.implements(p.IDatasetForm, inherit=True) - p.implements(p.IPackageController, inherit=True) - p.implements(p.IBlueprint) - p.implements(IDataDictionaryForm, inherit=True) - - try: - from ckanext.validation.interfaces import IDataValidation - except ImportError: - log.warn('failed to import ckanext-validation interface') - else: - p.implements(IDataValidation, inherit=True) - - - # IBlueprint - def get_blueprint(self): - """ - Prevents all Core Dataset and Resources Views - for all the PD types. Will type_redirect them - to the pd_type. Will allow //activity - """ - # type: () -> list[Blueprint] - blueprints = [] - for pd_type in h.recombinant_get_types(): - blueprint = Blueprint( - u'canada_%s' % pd_type, - __name__, - url_prefix=u'/%s' % pd_type, - url_defaults={u'package_type': pd_type}) - blueprint.add_url_rule( - u'/', - endpoint='canada_search_%s' % pd_type, - view_func=canada_search, - methods=['GET'] - ) - blueprint.add_url_rule( - u'/', - endpoint='canada_prevent_%s' % pd_type, - view_func=canada_prevent_pd_views, - methods=['GET', 'POST'] - ) - blueprints.append(blueprint) - return blueprints - - - def _redirect_pd_dataset_endpoints(blueprint): - """ - Runs before request for /dataset and /dataset//resource - - Checks if the actual package type is a PD type and redirects it. - """ - if has_request_context() and hasattr(request, 'view_args'): - id = request.view_args.get('id') - if not id: - return - package_type = request.view_args.get('package_type') - package_type = _get_package_type_from_dict(id, package_type) - if package_type in h.recombinant_get_types(): - return h.redirect_to('canada.type_redirect', - resource_name=package_type) - - - #IDatasetForm - def prepare_dataset_blueprint(self, package_type, blueprint): - # type: (str,Blueprint) -> Blueprint - blueprint.add_url_rule( - u'/edit/', - endpoint='canada_edit_%s' % package_type, - view_func=CanadaDatasetEditView.as_view(str(u'edit')), - methods=['GET', 'POST'] - ) - blueprint.add_url_rule( - u'/new', - endpoint='canada_new_%s' % package_type, - view_func=CanadaDatasetCreateView.as_view(str(u'new')), - methods=['GET', 'POST'] - ) - blueprint.add_url_rule( - u'/', - endpoint='canada_search_%s' % package_type, - view_func=canada_search, - methods=['GET'], - strict_slashes=False - ) - # redirect PD endpoints accessed from /dataset/ - blueprint.before_request(self._redirect_pd_dataset_endpoints) - return blueprint - - - #IDatasetForm - def prepare_resource_blueprint(self, package_type, blueprint): - # type: (str,Blueprint) -> Blueprint - blueprint.add_url_rule( - u'//edit', - endpoint='canada_resource_edit_%s' % package_type, - view_func=CanadaResourceEditView.as_view(str(u'edit')), - methods=['GET', 'POST'] - ) - blueprint.add_url_rule( - u'/new', - endpoint='canada_resource_new_%s' % package_type, - view_func=CanadaResourceCreateView.as_view(str(u'new')), - methods=['GET', 'POST'] - ) - # redirect PD endpoints accessed from /dataset//resource - blueprint.before_request(self._redirect_pd_dataset_endpoints) - return blueprint - - # IDataValidation - - def can_validate(self, context, resource): - """ - Only uploaded resources are allowed to be validated - """ - return resource.get(u'url_type') == u'upload' - - - # IPackageController - def before_search(self, search_params): - # We're going to group portal_release_date into two bins - to today and - # after today. - search_params['facet.range'] = 'portal_release_date' - search_params['facet.range.start'] = 'NOW/DAY-%sYEARS' % helpers.RELEASE_DATE_FACET_STEP - search_params['facet.range.end'] = 'NOW/DAY+%sYEARS' % helpers.RELEASE_DATE_FACET_STEP - search_params['facet.range.gap'] = '+%sYEARS' % helpers.RELEASE_DATE_FACET_STEP - - # FIXME: so terrible. hack out WET4 wbdisable parameter - try: - search_params['fq'] = search_params['fq'].replace( - 'wbdisable:"true"', '').replace( - 'wbdisable:"false"', '') - except Exception: - pass - - try: - g.fields_grouped.pop('wbdisable', None) - except Exception: - pass - - # search extras for ckan-admin/publish route. - # we only want to show ready to publish, - # approved datasets without a release date. - if has_request_context() and 'ckan-admin/publish' in request.url: - search_params['extras']['ready_to_publish'] = u'true' - search_params['extras']['imso_approval'] = u'true' - search_params['fq'] += '+ready_to_publish:"true", +imso_approval:"true", -portal_release_date:*' - - # CKAN Core search view wraps all fq values with double quotes. - # We need to remove double quotes from the portal_release_date queries. - if 'fq' in search_params: - for release_date_query in re.findall(fq_portal_release_date_match, search_params['fq']): - search_params['fq'] = search_params['fq'].replace(release_date_query, release_date_query.replace('"', '')) - - return search_params - - - # IPackageController - def after_search(self, search_results, search_params): - for result in search_results.get('results', []): - for extra in result.get('extras', []): - if extra.get('key') in ['title_fra', 'notes_fra']: - result[extra['key']] = extra['value'] - - return search_results - - - # IPackageController - def before_index(self, data_dict): - kw = json.loads(data_dict.get('extras_keywords', '{}')) - data_dict['keywords'] = kw.get('en', []) - data_dict['keywords_fra'] = kw.get('fr', kw.get('fr-t-en', [])) - data_dict['catalog_type'] = data_dict.get('type', '') - - data_dict['subject'] = json.loads(data_dict.get('subject', '[]')) - data_dict['topic_category'] = json.loads(data_dict.get( - 'topic_category', '[]')) - try: - data_dict['spatial_representation_type'] = json.loads( - data_dict.get('spatial_representation_type') - ) - except (TypeError, ValueError): - data_dict['spatial_representation_type'] = [] - - if data_dict.get('portal_release_date'): - data_dict.pop('ready_to_publish', None) - elif data_dict.get('ready_to_publish') == 'true': - data_dict['ready_to_publish'] = 'true' - else: - data_dict['ready_to_publish'] = 'false' - - try: - geno = h.recombinant_get_geno(data_dict['type']) or {} - except AttributeError: - pass - else: - data_dict['portal_type'] = geno.get('portal_type', data_dict['type']) - if 'collection' in geno: - data_dict['collection'] = geno['collection'] - - # need to keep fgp_viewer in the index for Advanced Search App - if 'fgp_viewer' in data_dict.get('display_flags', []): - data_dict['fgp_viewer'] = 'map_view' - - titles = json.loads(data_dict.get('title_translated', '{}')) - data_dict['title_fr'] = titles.get('fr', '') - data_dict['title_string'] = titles.get('en', '') - - if data_dict['type'] == 'prop': - status = data_dict.get('status') - data_dict['status'] = status[-1]['reason'] if status else 'department_contacted' - - if data_dict.get('credit'): - for cr in data_dict['credit']: - cr.pop('__extras', None) - - return data_dict - - # IDataDictionaryForm - - def update_datastore_info_field(self, field, plugin_data): - if 'info' or '_info' in plugin_data and 'info' not in field: - if 'info' in plugin_data: - field['info'] = plugin_data.get('info', {}) - elif '_info' in plugin_data: - field['info'] = plugin_data.get('_info', {}) - return field - - -class DataGCCAInternal(p.SingletonPlugin): - """ - Plugin for internal version of data.gc.ca site, aka the "registry" - This plugin requires the DataGCCAPublic and DataGCCAForms plugins - """ - p.implements(p.IConfigurable) - p.implements(p.IConfigurer) - p.implements(p.IPackageController, inherit=True) - p.implements(p.IActions) - p.implements(IXloader, inherit=True) - p.implements(p.IAuthFunctions) - - # IConfigurer - def update_config(self, config): - config.update({ - "ckan.user_list_limit": 250 - }) - # registry includes validation so use real validation presets - config['scheming.presets'] = """ -ckanext.scheming:presets.json -ckanext.fluent:presets.json -ckanext.canada:schemas/presets.yaml -""" + ( - "ckanext.validation:presets.json" if "validation" in config['ckan.plugins'] else - "ckanext.canada:schemas/validation_placeholder_presets.yaml" -) - - # Include private datasets in Feeds - config['ckan.feeds.include_private'] = True - - - # IConfigurable - def configure(self, config): - # FIXME: monkey-patch datastore upsert_data - from ckanext.datastore.backend import postgres as db - original_upsert_data = db.upsert_data - def patched_upsert_data(context, data_dict): - with logic.datastore_create_temp_user_table(context): - try: - return original_upsert_data(context, data_dict) - except ValidationError as e: - # reformat tab-delimited error as dict - head, sep, rerr = e.error_dict.get('records', [''])[0].partition('\t') - rerr = rerr.rstrip('\n') - if head == 'TAB-DELIMITED' and sep: - out = {} - it = iter(rerr.split('\t')) - for key, error in zip(it, it): - out.setdefault(key, []).append(error) - e.error_dict['records'] = [out] - raise e - if db.upsert_data.__name__ == 'upsert_data': - db.upsert_data = patched_upsert_data - - # IPackageController - def create(self, pkg): - """ - All datasets on registry should now be marked private - """ - pkg.private = True - - # IPackageController - def edit(self, pkg): - """ - All datasets on registry should now be marked private - """ - pkg.private = True - - # IActions - - def get_actions(self): - return dict( - { - k: disabled_anon_action for k in [ - 'package_activity_list', - 'recently_changed_packages_activity_list', - 'dashboard_activity_list', - 'changed_packages_activity_timestamp_since', - ] - }, - resource_view_update=resource_view_update_bilingual, - resource_view_create=resource_view_create_bilingual, - datastore_run_triggers=logic.canada_datastore_run_triggers, - portal_sync_info=logic.portal_sync_info, - list_out_of_sync_packages=logic.list_out_of_sync_packages, - ) - - # IAuthFunctions - - def get_auth_functions(self): - return { - 'group_list': auth.group_list, - 'group_show': auth.group_show, - 'organization_list': auth.organization_list, - 'organization_show': auth.organization_show, - 'portal_sync_info': auth.portal_sync_info, - 'list_out_of_sync_packages': auth.list_out_of_sync_packages, - } - - # IXloader - - def can_upload(self, resource_id): - - # check if file is uploded - try: - res = p.toolkit.get_action(u'resource_show')({'ignore_auth': True}, - {'id': resource_id}) - - if res.get('url_type', None) != 'upload': - log.error( - 'Only uploaded resources can be added to the Data Store.') - return False - - except ObjectNotFound: - log.error('Resource %s does not exist.' % resource_id) - return False - - # check if validation report exists - try: - validation = p.toolkit.get_action(u'resource_validation_show')( - {'ignore_auth': True}, - {'resource_id': res['id']}) - if validation.get('status', None) != 'success': - log.error( - 'Only validated resources can be added to the Data Store.') - return False - - except ObjectNotFound: - log.error('No validation report exists for resource %s' % - resource_id) - return False - - return True - - -@chained_action -def disabled_anon_action(up_func, context, data_dict): - if not context.get('ignore_auth', False) and context.get('user', 'visitor') in ('', 'visitor'): - return [] - return up_func(context, data_dict) -disabled_anon_action.side_effect_free = True -disabled_anon_action.auth_audit_exempt = True - - -def _disabled_action(context, data_dict): - """ - Raises a NotFound exception to disable a logic action method. - """ - raise ObjectNotFound -_disabled_action.side_effect_free = True -_disabled_action.auth_audit_exempt = True - - -@chained_action -def resource_view_create_bilingual(up_func, context, data_dict): - from ckan.logic.schema import default_create_resource_view_schema_filtered - # assuming all resource views we used are filtered - # filter_fields and filter_values have ignore_missing validator - # so using the filtered schema should be fine here. - s = default_create_resource_view_schema_filtered() - return up_func( - dict( - context, - schema=dict( - s, - title=[get_validator('default')('View'), get_validator('unicode_safe')], - title_fr=[get_validator('default')('Vue'), get_validator('unicode_safe')], - description=[get_validator('default')(''), get_validator('unicode_safe')], - description_fr=[get_validator('default')(''), get_validator('unicode_safe')], - ), - ), - data_dict - ) - -@chained_action -def resource_view_update_bilingual(up_func, context, data_dict): - from ckan.logic.schema import ( - default_create_resource_view_schema_filtered, - default_update_resource_view_schema_changes, - ) - # assuming all resource views we used are filtered - # filter_fields and filter_values have ignore_missing validator - # so using the filtered schema should be fine here. - s = default_create_resource_view_schema_filtered() - s.update(default_update_resource_view_schema_changes()) - return up_func( - dict( - context, - schema=dict( - s, - title_fr=list(s['title']), - description_fr=list(s['description']), - ), - ), - data_dict - ) - - -class DataGCCAPublic(p.SingletonPlugin, DefaultTranslation): - """ - Plugin for public-facing version of Open Government site, aka the "portal" - This plugin requires the DataGCCAForms plugin - """ - p.implements(p.IConfigurer) - p.implements(p.IAuthFunctions) - p.implements(p.IFacets) - p.implements(p.ITranslation, inherit=True) - p.implements(p.IMiddleware, inherit=True) - p.implements(p.IActions) - p.implements(p.IClick) - p.implements(IColumnTypes) - p.implements(p.IBlueprint) - - # DefaultTranslation, ITranslation - def i18n_domain(self): - return 'ckanext-canada' - - # IConfigurer - def update_config(self, config): - config['ckan.auth.public_user_details'] = False - config['recombinant.definitions'] = """ -ckanext.canada:tables/ati.yaml -ckanext.canada:tables/briefingt.yaml -ckanext.canada:tables/qpnotes.yaml -ckanext.canada:tables/contracts.yaml -ckanext.canada:tables/contractsa.yaml -ckanext.canada:tables/grants.yaml -ckanext.canada:tables/grantsmonthly.yaml -ckanext.canada:tables/hospitalityq.yaml -ckanext.canada:tables/reclassification.yaml -ckanext.canada:tables/travela.yaml -ckanext.canada:tables/travelq.yaml -ckanext.canada:tables/wrongdoing.yaml -ckanext.canada:tables/inventory.yaml -ckanext.canada:tables/consultations.yaml -ckanext.canada:tables/service.yaml -ckanext.canada:tables/dac.yaml -ckanext.canada:tables/nap5.yaml -ckanext.canada:tables/experiment.yaml -ckanext.canada:tables/adminaircraft.yaml - -""" - config['ckan.search.show_all_types'] = True - config['ckan.gravatar_default'] = 'disabled' - config['search.facets.limit'] = 200 # because org list - if 'validation' not in config.get('scheming.presets', ''): - config['scheming.presets'] = """ -ckanext.scheming:presets.json -ckanext.fluent:presets.json -ckanext.canada:schemas/presets.yaml -ckanext.canada:schemas/validation_placeholder_presets.yaml -""" - config['scheming.dataset_schemas'] = """ -ckanext.canada:schemas/dataset.yaml -ckanext.canada:schemas/info.yaml -ckanext.canada:schemas/prop.yaml -""" - config['scheming.organization_schemas'] = 'ckanext.canada:schemas/organization.yaml' - - # Pretty output for Feeds - config['ckan.feeds.pretty'] = True - - # Enable our custom DCAT profile. - config['ckanext.dcat.rdf.profiles'] = 'euro_dcat_ap_2' - - # Enable license restriction - config['ckan.dataset.restrict_license_choices'] = True - - # monkey patch helpers.py pagination method - hlp.Page.pager = _wet_pager - hlp.SI_number_span = _SI_number_span_close - - hlp.build_nav_main = build_nav_main - - # migration from `canada_activity` and `ckanext-extendedactivity` - Aug 2022 - # migrated from `ckan` canada fork for resource view activities - Jan 2024 - logic_validators.object_id_validators.update({ - 'new resource view': logic_validators.package_id_exists, - 'changed resource view': logic_validators.package_id_exists, - 'deleted resource view': logic_validators.package_id_exists, - }) - - # IFacets - def dataset_facets(self, facets_dict, package_type): - ''' Update the facets_dict and return it. ''' - - facets_dict.update({ - 'portal_type': _('Portal Type'), - 'organization': _('Organization'), - 'collection': _('Collection Type'), - 'keywords': _('Keywords'), - 'keywords_fra': _('Keywords'), - 'subject': _('Subject'), - 'res_format': _('Format'), - 'res_type': _('Resource Type'), - 'frequency': _('Maintenance and Update Frequency'), - 'ready_to_publish': _('Record Status'), - 'imso_approval': _('IMSO Approval'), - 'jurisdiction': _('Jurisdiction'), - 'status': _('Suggestion Status'), - }) - - return facets_dict - - # IFacets - #FIXME: remove `group_facets` method once issue https://github.com/ckan/ckan/issues/7017 is patched into <2.9 - def group_facets(self, facets_dict, group_type, package_type): - ''' Update the facets_dict and return it. ''' - if group_type == 'organization': - return self.dataset_facets(facets_dict, package_type) - return facets_dict - - # IFacets - def organization_facets(self, facets_dict, organization_type, - package_type): - return self.dataset_facets(facets_dict, package_type) - - # IActions - def get_actions(self): - return { - 'recently_changed_packages_activity_list': act.recently_changed_packages_activity_list, #TODO: Remove this action override in CKAN 2.10 upgrade - 'resource_view_show': logic.canada_resource_view_show, - 'resource_view_list': logic.canada_resource_view_list, - 'job_list': logic.canada_job_list, - 'registry_jobs_running': logic.registry_jobs_running, - } - - # IAuthFunctions - def get_auth_functions(self): - return { - 'datastore_create': auth.datastore_create, - 'datastore_delete': auth.datastore_delete, - 'datastore_upsert': auth.datastore_upsert, - 'view_org_members': auth.view_org_members, - 'registry_jobs_running': auth.registry_jobs_running, - } - - # IMiddleware - - def make_middleware(self, app, config): - return LogExtraMiddleware(app, config) - - # IClick - - def get_commands(self): - return [cli.get_commands(), get_pd_commands()] - - # IColumnTypes - - def column_types(self, existing_types): - return dict( - existing_types, - province=coltypes.Province, - crabusnum=coltypes.CRABusinessNumber, - ) - - # IBlueprint - def get_blueprint(self): - # type: () -> list[Blueprint] - return [canada_views] - - -class DataGCCAForms(p.SingletonPlugin, DefaultDatasetForm): - """ - Plugin for dataset forms for Canada's metadata schema - """ - p.implements(p.IActions) - p.implements(p.IValidators, inherit=True) - - # IActions - - def get_actions(self): - actions = logic.limit_api_logic() - actions.update((h, getattr(logic, h)) for h in [ - 'changed_packages_activity_timestamp_since', - 'canada_guess_mimetype', - ]) - actions.update({k: disabled_anon_action for k in [ - 'current_package_list_with_resources', - 'user_list', - 'user_activity_list', - 'member_list', - #'user_show', FIXME: required for password reset - 'package_autocomplete', - 'format_autocomplete', - 'user_autocomplete', - 'group_activity_list', - 'organization_activity_list', - 'group_package_show', - ]}) - # disable group & organization bulk actions as they do not support - # IPackageController and IResourceController implementations. - actions.update({k: _disabled_action for k in [ - 'bulk_update_private', - 'bulk_update_public', - 'bulk_update_delete', - '_bulk_update_dataset',]}) - return actions - - # IValidators - - def get_validators(self): - return { - 'canada_validate_generate_uuid': - validators.canada_validate_generate_uuid, - 'canada_tags': validators.canada_tags, - 'geojson_validator': validators.geojson_validator, - 'email_validator': validators.email_validator, - 'protect_portal_release_date': - validators.protect_portal_release_date, - 'canada_copy_from_org_name': - validators.canada_copy_from_org_name, - 'canada_non_related_required': - validators.canada_non_related_required, - 'canada_maintainer_email_default': - validators.canada_maintainer_email_default, - 'user_read_only': - validators.user_read_only, - 'user_read_only_json': - validators.user_read_only_json, - 'canada_sort_prop_status': - validators.canada_sort_prop_status, - 'no_future_date': - validators.no_future_date, - 'canada_org_title_translated_save': - validators.canada_org_title_translated_save, - 'canada_org_title_translated_output': - validators.canada_org_title_translated_output, - 'protect_reporting_requirements': - validators.protect_reporting_requirements, - 'ati_email_validate': - validators.ati_email_validate, - 'isodate': - validators.isodate, - 'string_safe': - validators.string_safe, - 'string_safe_stop': - validators.string_safe_stop, - 'json_string': - validators.json_string, - 'json_string_has_en_fr_keys': - validators.json_string_has_en_fr_keys, - 'canada_static_charset_tabledesigner': - validators.canada_static_charset_tabledesigner, - 'canada_static_rtype_tabledesigner': - validators.canada_static_rtype_tabledesigner, - 'canada_guess_resource_format': - validators.canada_guess_resource_format, - 'canada_output_none': - validators.canada_output_none, - 'protect_registry_access': - validators.protect_registry_access, - 'limit_resources_per_dataset': - validators.limit_resources_per_dataset, - } - - -class LogExtraMiddleware(object): - def __init__(self, app, config): - self.app = app - - def __call__(self, environ, start_response): - def _start_response(status, response_headers, exc_info=None): - extra = [] - try: - contextual_user = g.user - except (TypeError, RuntimeError, AttributeError): - contextual_user = None - if contextual_user: - log_extra = g.log_extra if hasattr(g, 'log_extra') else '' - #FIXME: make sure username special chars are handled - # the values in the tuple HAVE to be str types. - extra = [('X-LogExtra', f'user={contextual_user} {log_extra}')] - - return start_response( - status, - response_headers + extra, - exc_info) - - return self.app(environ, _start_response) - - -def _wet_pager(self, *args, **kwargs): - ## a custom pagination method, because CKAN doesn't expose the pagination to the templates, - ## and instead hardcodes the pagination html in helpers.py - - kwargs.update( - format=u"
    $link_previous ~2~ $link_next
", - symbol_previous=hlp._('Previous'), symbol_next=hlp._('Next'), - curpage_attr={'class': 'active'} - ) - - return super(hlp.Page, self).pager(*args, **kwargs) - -def _SI_number_span_close(number): - ''' outputs a span with the number in SI unit eg 14700 -> 14.7k ''' - number = int(number) - if number < 1000: - output = h.literal('') - else: - output = h.literal('') - return output + formatters.localised_SI_number(number) + h.literal('') - - -# Monkey Patched to inlude the 'list-group-item' class -# TODO: Clean up and convert to proper HTML templates -def build_nav_main(*args): - ''' build a set of menu items. - - args: tuples of (menu type, title) eg ('login', _('Login')) - outputs
  • title
  • - ''' - output = '' - for item in args: - menu_item, title = item[:2] - if len(item) == 3 and not hlp.check_access(item[2]): - continue - output += hlp._make_menu_item(menu_item, title, class_='list-group-item') - return output - From ad4c0d9385fe281e6517448002de989e06eb7ff9 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Thu, 13 Feb 2025 16:05:26 -0500 Subject: [PATCH 15/36] add grantsmonthly.csv to makefile --- bin/pd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/pd/Makefile b/bin/pd/Makefile index 776eb9395..cab48f9fe 100644 --- a/bin/pd/Makefile +++ b/bin/pd/Makefile @@ -405,7 +405,7 @@ $(workdir)/filtered/experiment.csv: $(workdir)/experiment.csv grants: upload-grants rebuild-grants .PHONY: upload-grants -upload-grants: $(workdir)/filtered/grants.csv $(workdir)/filtered/grants-nil.csv +upload-grants: $(workdir)/filtered/grants.csv $(workdir)/filtered/grants-nil.csv $(workdir)/filtered/grantsmonthly.csv @$(echo_date) Uploading Grants and Contributions... @$(ckanapi) action resource_patch -c $(registry_ini) \ id=1d15a62f-5656-49ad-8c88-f40ce689d831 upload@"$(workdir)/filtered/grants.csv" \ From 86bd1059e7558f70e0216a48c8d416160bb6b21c Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Thu, 13 Feb 2025 16:12:50 -0500 Subject: [PATCH 16/36] add published_resource_id for grantsmonthly.csv --- ckanext/canada/tables/grantsmonthly.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index 474f7c565..408a57bd5 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -14,7 +14,7 @@ resources: - title: Proactive Publication - Grants and Contributions Data Sharing Pilot resource_name: grantsmonthly - published_resource_id: TBD + published_resource_id: a4fa27d7-0c7c-4e31-bc0a-2d1cf249f749 create_form: true edit_form: true From 7f6a9544ad32896c17ba47a79f2ec04df2646fdb Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Thu, 13 Feb 2025 16:17:48 -0500 Subject: [PATCH 17/36] fix linting error in filter_grants_monthly --- bin/filter/filter_grants_monthly.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/filter/filter_grants_monthly.py b/bin/filter/filter_grants_monthly.py index 707bdb4f6..0c0242903 100755 --- a/bin/filter/filter_grants_monthly.py +++ b/bin/filter/filter_grants_monthly.py @@ -10,6 +10,7 @@ 'user_modified', ] + def main(): reader = csv.DictReader(sys.stdin) outnames = [f for f in reader.fieldnames if f not in REMOVE_COLUMNS] From bd29ef373d748c975ecf8020a5129a928591de0a Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Thu, 13 Feb 2025 16:53:26 -0500 Subject: [PATCH 18/36] add grantsmonthly to test ini file --- test-core.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/test-core.ini b/test-core.ini index f4544211c..adfa66710 100644 --- a/test-core.ini +++ b/test-core.ini @@ -25,6 +25,7 @@ recombinant.definitions = ckanext.canada:tables/ati.yaml ckanext.canada:tables/contracts.yaml ckanext.canada:tables/contractsa.yaml ckanext.canada:tables/grants.yaml + ckanext.canada:tables/grantsmonthly.yaml ckanext.canada:tables/hospitalityq.yaml ckanext.canada:tables/reclassification.yaml ckanext.canada:tables/travela.yaml From 35a046e0160c8184c2fd5b02b6c4b9bd516cf575 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Thu, 13 Feb 2025 16:56:00 -0500 Subject: [PATCH 19/36] fix linting error in grants filter --- bin/filter/filter_grants_monthly.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/filter/filter_grants_monthly.py b/bin/filter/filter_grants_monthly.py index 0c0242903..1d7d9a0a3 100755 --- a/bin/filter/filter_grants_monthly.py +++ b/bin/filter/filter_grants_monthly.py @@ -24,4 +24,5 @@ def main(): except ValueError: pass + main() From 7e827797bb0af1e64c894d35fadaaa01706cea11 Mon Sep 17 00:00:00 2001 From: Jesse Vickery Date: Tue, 25 Feb 2025 20:57:08 +0000 Subject: [PATCH 20/36] fix(pd): grants monthly example value; - Array value for example. --- ckanext/canada/tables/grantsmonthly.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index 408a57bd5..3d3c756a5 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -594,14 +594,14 @@ resources: fr: Description du groupe démographique des bénéficiaires visés (anglais) description: en: > - This field is mandatory if “Other” is chosen as an - option for the field “Intended Beneficiary demographic - group”. This field has a maximum length of 1800 + This field is mandatory if “Other” is chosen as an + option for the field “Intended Beneficiary demographic + group”. This field has a maximum length of 1800 characters. This text must be provided in both languages. fr: > - Ce champ est obligatoire si l'option « Autre » est choisie + Ce champ est obligatoire si l'option « Autre » est choisie pour le champ « Groupe démographique des bénéficiaires visés ». - Ce champ ne peut excéder une longueur maximale de 1800 + Ce champ ne peut excéder une longueur maximale de 1800 caractères. Ce texte doit être fourni en anglais et en français. obligation: en: Mandatory if “Other” is chosen as an option for the field “Intended Beneficiary demographic group”. @@ -628,14 +628,14 @@ resources: fr: Description du groupe démographique des bénéficiaires visés (français) description: en: > - This field is mandatory if “Other” is chosen as an - option for the field “Intended Beneficiary demographic - group”. This field has a maximum length of 1800 + This field is mandatory if “Other” is chosen as an + option for the field “Intended Beneficiary demographic + group”. This field has a maximum length of 1800 characters. This text must be provided in both languages. fr: > - Ce champ est obligatoire si l'option « Autre » est choisie + Ce champ est obligatoire si l'option « Autre » est choisie pour le champ « Groupe démographique des bénéficiaires visés ». - Ce champ ne peut excéder une longueur maximale de 1800 + Ce champ ne peut excéder une longueur maximale de 1800 caractères. Ce texte doit être fourni en anglais et en français. obligation: en: Mandatory if “Other” is chosen as an option for the field “Intended Beneficiary demographic group”. @@ -715,7 +715,7 @@ resources: A “High” rating suggests the department has identified a substantial level of risk, with significant concerns regarding the recipient's financial situation, organizational capacity, and compliance with previous agreement. As a result, intensive oversight or specific conditions may be necessary to mitigate potential issues. fr: | - Le champ indique l'évaluation du risque pour l'organisation telle qu'elle a été déterminée par le département. + Le champ indique l'évaluation du risque pour l'organisation telle qu'elle a été déterminée par le département. Une évaluation « faible » suggère que le département a identifié un risque minimal dans le financement de ce bénéficiaire, indiquant une forte stabilité financière, des antécédents de conformité et une capacité organisationnelle. Le bénéficiaire est considéré comme digne de confiance en ce qui concerne sa capacité à gérer les fonds et à atteindre les résultats escomptés. @@ -886,7 +886,7 @@ resources: description_fr: "Met au point des modèles et d'autres outils pour prévoir la sécurité des bâtiments." expected_results_en: "Develop highly qualified personnel available to pursue various careers within industry, academia, government and other sectors of the economy." expected_results_fr: "Développé un personnel hautement qualifié prêt à mener une carrière variée au sein de l’industrie, du milieu académique, de la fonction publique ou dans d’autres secteurs de l’économie." - dem_intended_beneficiary: "Y" + dem_intended_beneficiary: ["Y"] other_dem_intended_beneficiary_description_en: "immigrant owned" other_dem_intended_beneficiary_description_fr: "appartenant à des immigrés" reason_amendment: "S" From a78d70c69fbca58f5c09fb5b836c1b8b36ec1584 Mon Sep 17 00:00:00 2001 From: Rabia Sajjad Date: Tue, 25 Feb 2025 17:07:37 -0500 Subject: [PATCH 21/36] fix(tests): make grants; - Include grants monthly prep. --- ckanext/canada/tests/test_make.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ckanext/canada/tests/test_make.py b/ckanext/canada/tests/test_make.py index 6f72d617c..52ff98ad6 100644 --- a/ckanext/canada/tests/test_make.py +++ b/ckanext/canada/tests/test_make.py @@ -346,6 +346,8 @@ def test_make_grants(self): self._setup_ini(self.ckan_ini) self._setup_pd(type='grants', nil_type='grants-nil') + # (staging branch only): grantsmonthly is included in make-grants + self._setup_pd(type='grantsmonthly') make_process = subprocess.Popen(["make upload-grants"], shell=True, cwd=MAKE_PATH, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) stdout, stderr = make_process.communicate() From 83350f8e4f2eb2265a089f89714a750f4e185090 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Wed, 5 Mar 2025 08:27:04 -0500 Subject: [PATCH 22/36] dep updates for grantsmonthly --- ckanext/canada/tables/grantsmonthly.yaml | 129 ++++++++++++++++++----- 1 file changed, 105 insertions(+), 24 deletions(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index 3d3c756a5..955bc46e9 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -521,14 +521,14 @@ resources: form_attrs: style: "width: 100%; display: block" - # 3.26 Demographic of the intended beneficiary + # 3.26 Demographic of the ultimate beneficiary - datastore_id: dem_intended_beneficiary label: - en: Intended Beneficiary demographic group - fr: Groupe démographique des bénéficiaires visés + en: Ultimate Beneficiary demographic group + fr: Groupe démographique des bénéficiaires ultimes description: - en: The field indicates whether the intended beneficiaries belong to a specific demographic group. - fr: Le champ indique si les bénéficiaires visés font partie d’un groupe démographique identifié. + en: The field indicates whether the ultimate beneficiaries belong to a specific demographic group. + fr: Le champ indique si les bénéficiaires ultimes font partie d’un groupe démographique identifié. obligation: Mandatory occurrence: Repeatable excel_required: true @@ -539,7 +539,7 @@ resources: en: This field must not be empty. fr: Ce champ ne doit pas être vide. datastore_type: _text - form_snippet: scheming/form_snippets/text.html + form_snippet: scheming/form_snippets/multiple_select.html choice_order_expression: 'value.get("order", False), code' choices: Y: @@ -587,25 +587,25 @@ resources: fr: Collecté mais confidentiel order: 11 - # 3.27 Other Demographic of intended beneficiary Description (English) + # 3.27 Other Demographic of ultimate beneficiary Description (English) - datastore_id: other_dem_intended_beneficiary_description_en label: - en: Demographic of intended beneficiary Description (English) - fr: Description du groupe démographique des bénéficiaires visés (anglais) + en: Demographic of ultimate beneficiary Description (English) + fr: Description du groupe démographique des bénéficiaires ultimes (anglais) description: en: > This field is mandatory if “Other” is chosen as an - option for the field “Intended Beneficiary demographic + option for the field “Ultimate Beneficiary demographic group”. This field has a maximum length of 1800 characters. This text must be provided in both languages. fr: > Ce champ est obligatoire si l'option « Autre » est choisie - pour le champ « Groupe démographique des bénéficiaires visés ». + pour le champ « Groupe démographique des bénéficiaires ultimes ». Ce champ ne peut excéder une longueur maximale de 1800 caractères. Ce texte doit être fourni en anglais et en français. obligation: - en: Mandatory if “Other” is chosen as an option for the field “Intended Beneficiary demographic group”. - fr: Obligatoire si l'option « Autre » est choisie pour le champ « Groupe démographique des bénéficiaires visés ». + en: Mandatory if “Other” is chosen as an option for the field “Ultimate Beneficiary demographic group”. + fr: Obligatoire si l'option « Autre » est choisie pour le champ « Groupe démographique des bénéficiaires ultimes ». excel_required: false form_required: false excel_column_width: 40 @@ -621,25 +621,25 @@ resources: style: "width: 100%; display: block" maxlength: 1800 - # 3.28 Other Demographic of intended beneficiary Description (French) + # 3.28 Other Demographic of ultimate beneficiary Description (French) - datastore_id: other_dem_intended_beneficiary_description_fr label: - en: Demographic of intended beneficiary Description (French) - fr: Description du groupe démographique des bénéficiaires visés (français) + en: Demographic of ultimate beneficiary Description (French) + fr: Description du groupe démographique des bénéficiaires ultimes (français) description: en: > This field is mandatory if “Other” is chosen as an - option for the field “Intended Beneficiary demographic + option for the field “Ultimate Beneficiary demographic group”. This field has a maximum length of 1800 characters. This text must be provided in both languages. fr: > Ce champ est obligatoire si l'option « Autre » est choisie - pour le champ « Groupe démographique des bénéficiaires visés ». + pour le champ « Groupe démographique des bénéficiaires ultimes ». Ce champ ne peut excéder une longueur maximale de 1800 caractères. Ce texte doit être fourni en anglais et en français. obligation: - en: Mandatory if “Other” is chosen as an option for the field “Intended Beneficiary demographic group”. - fr: Obligatoire si l'option « Autre » est choisie pour le champ « Groupe démographique des bénéficiaires visés ». + en: Mandatory if “Other” is chosen as an option for the field “Ultimate Beneficiary demographic group”. + fr: Obligatoire si l'option « Autre » est choisie pour le champ « Groupe démographique des bénéficiaires ultimes ». excel_required: false form_required: false excel_column_width: 40 @@ -664,7 +664,7 @@ resources: en: The field indicates the reason for the amendment to the project. fr: Le champ indique la raison pour le changement au projet. obligation: Mandatory - occurrence: Single + occurrence: Repeatable excel_required: true form_required: true format_type: Controlled List @@ -673,6 +673,7 @@ resources: fr: Ce champ ne doit pas être vide. datastore_type: text excel_full_text_choices: true + form_snippet: scheming/form_snippets/multiple_select.html choice_order_expression: 'value.get("order", False), code' choices: S: @@ -700,7 +701,77 @@ resources: fr: Inconnu order: 6 - # 3.30 Risk rating + # 3.30 Reason for amendment Description (English) + - datastore_id: other_reason_amendment_en + label: + en: Reason for amendment Description (English) + fr: Description du raison pour changement (anglais) + description: + en: > + This field is mandatory if “Other” is chosen as + an option for the field “Reason for amendment”. + This field has a maximum length of 1800 characters. + This text must be provided in both languages. + fr: > + Ce champ est obligatoire si l'option « Autre » est + choisie pour le champ « Raison pour changement ». + Ce champ ne peut excéder une longueur maximale de + 1800 caractères. Ce texte doit être fourni en anglais + et en français. + obligation: + en: Mandatory if “Other” is chosen as an option for the field “Reason for amendment”. + fr: Obligatoire si l'option « Autre » est choisie pour le champ « Raison pour changement ». + excel_required: false + form_required: false + excel_column_width: 40 + validation: + en: This field has a maximum length of 1800 characters. This text must be provided in both languages. + fr: Ce champ ne peut excéder une longueur maximale de 1800 caractères. Ce texte doit être fourni en anglais et en français. + occurrence: Single + format_type: Free text + datastore_type: text + max_chars: 1800 + excel_required_formula: 'OR(TRIM(LEFT({reason_amendment},FIND(":",{reason_amendment}&":")-1))="O",NOT(ISBLANK({other_reason_amendment_fr})))' + form_attrs: + style: "width: 100%; display: block" + maxlength: 1800 + + # 3.31 Reason for amendment Description (French) + - datastore_id: other_reason_amendment_fr + label: + en: Reason for amendment Description (French) + fr: Description du raison pour changement (français) + description: + en: > + This field is mandatory if “Other” is chosen as + an option for the field “Reason for amendment”. + This field has a maximum length of 1800 characters. + This text must be provided in both languages. + fr: > + Ce champ est obligatoire si l'option « Autre » est + choisie pour le champ « Raison pour changement ». + Ce champ ne peut excéder une longueur maximale de + 1800 caractères. Ce texte doit être fourni en anglais + et en français. + obligation: + en: Mandatory if “Other” is chosen as an option for the field “Reason for amendment”. + fr: Obligatoire si l'option « Autre » est choisie pour le champ « Raison pour changement ». + excel_required: false + form_required: false + excel_column_width: 40 + validation: + en: This field has a maximum length of 1800 characters. This text must be provided in both languages. + fr: Ce champ ne peut excéder une longueur maximale de 1800 caractères. Ce texte doit être fourni en anglais et en français. + occurrence: Single + format_type: Free text + datastore_type: text + max_chars: 1800 + excel_required_formula: 'OR(TRIM(LEFT({reason_amendment},FIND(":",{reason_amendment}&":")-1))="O",NOT(ISBLANK({other_reason_amendment_en})))' + form_attrs: + style: "width: 100%; display: block" + maxlength: 1800 + + # 3.32 Risk rating - datastore_id: rating_risk label: en: Risk rating @@ -820,7 +891,15 @@ resources: errors := errors || both_languages_error(NEW.other_dem_intended_beneficiary_description_en, 'other_dem_intended_beneficiary_description_en', NEW.other_dem_intended_beneficiary_description_fr, 'other_dem_intended_beneficiary_description_fr'); END IF; errors := errors || required_error(NEW.reason_amendment, 'reason_amendment'); - errors := errors || choice_error(NEW.reason_amendment, {reason_amendment}, 'reason_amendment'); + crval := choices_clean_error(NEW.reason_amendment, {reason_amendment}, 'reason_amendment'); + errors := errors || crval.error; + NEW.reason_amendment := crval.clean; + IF 'O' = ANY(NEW.reason_amendment) THEN + errors := errors || conditional_required_error(NEW.other_reason_amendment_en, 'other_reason_amendment_en'); + errors := errors || conditional_required_error(NEW.other_reason_amendment_fr, 'other_reason_amendment_fr'); + ELSE + errors := errors || both_languages_error(NEW.other_reason_amendment_en, 'other_reason_amendment_en', NEW.other_reason_amendment_fr, 'other_reason_amendment_fr'); + END IF; errors := errors || required_error(NEW.rating_risk, 'rating_risk'); errors := errors || choice_error(NEW.rating_risk, {rating_risk}, 'rating_risk'); @@ -889,7 +968,9 @@ resources: dem_intended_beneficiary: ["Y"] other_dem_intended_beneficiary_description_en: "immigrant owned" other_dem_intended_beneficiary_description_fr: "appartenant à des immigrés" - reason_amendment: "S" + reason_amendment: ["S"] + other_reason_amendment_en: Change of the eligible activities or initiatives + other_reason_amendment_fr: Modification des activités ou initiatives éligibles rating_risk: "L" filters: From a5b07112bccb88a25343d02a40e254c1cdd6a3ea Mon Sep 17 00:00:00 2001 From: Jesse Vickery Date: Wed, 5 Mar 2025 14:45:51 +0000 Subject: [PATCH 23/36] fix(pd): grantsmonthly column type; - `text` -> `_text` - Added test class for grants monthly. --- ckanext/canada/tables/grantsmonthly.yaml | 30 +++++++++++----------- ckanext/canada/tests/test_grants.py | 32 ++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 15 deletions(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index 955bc46e9..2cc1d6c26 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -671,7 +671,7 @@ resources: validation: en: This field must not be empty. fr: Ce champ ne doit pas être vide. - datastore_type: text + datastore_type: _text excel_full_text_choices: true form_snippet: scheming/form_snippets/multiple_select.html choice_order_expression: 'value.get("order", False), code' @@ -708,15 +708,15 @@ resources: fr: Description du raison pour changement (anglais) description: en: > - This field is mandatory if “Other” is chosen as - an option for the field “Reason for amendment”. - This field has a maximum length of 1800 characters. + This field is mandatory if “Other” is chosen as + an option for the field “Reason for amendment”. + This field has a maximum length of 1800 characters. This text must be provided in both languages. fr: > - Ce champ est obligatoire si l'option « Autre » est - choisie pour le champ « Raison pour changement ». - Ce champ ne peut excéder une longueur maximale de - 1800 caractères. Ce texte doit être fourni en anglais + Ce champ est obligatoire si l'option « Autre » est + choisie pour le champ « Raison pour changement ». + Ce champ ne peut excéder une longueur maximale de + 1800 caractères. Ce texte doit être fourni en anglais et en français. obligation: en: Mandatory if “Other” is chosen as an option for the field “Reason for amendment”. @@ -743,15 +743,15 @@ resources: fr: Description du raison pour changement (français) description: en: > - This field is mandatory if “Other” is chosen as - an option for the field “Reason for amendment”. - This field has a maximum length of 1800 characters. + This field is mandatory if “Other” is chosen as + an option for the field “Reason for amendment”. + This field has a maximum length of 1800 characters. This text must be provided in both languages. fr: > - Ce champ est obligatoire si l'option « Autre » est - choisie pour le champ « Raison pour changement ». - Ce champ ne peut excéder une longueur maximale de - 1800 caractères. Ce texte doit être fourni en anglais + Ce champ est obligatoire si l'option « Autre » est + choisie pour le champ « Raison pour changement ». + Ce champ ne peut excéder une longueur maximale de + 1800 caractères. Ce texte doit être fourni en anglais et en français. obligation: en: Mandatory if “Other” is chosen as an option for the field “Reason for amendment”. diff --git a/ckanext/canada/tests/test_grants.py b/ckanext/canada/tests/test_grants.py index 723086bbc..62ac0afeb 100644 --- a/ckanext/canada/tests/test_grants.py +++ b/ckanext/canada/tests/test_grants.py @@ -46,3 +46,35 @@ def test_empty_string_instead_of_null(self): self.lc.action.datastore_upsert( resource_id=self.resource_id, records=[record]) + +# (staging fork only): grants monthly +class TestGrantsMonthly(CanadaTestBase): + @classmethod + def setup_method(self, method): + """Method is called at class level before EACH test methods of the class are called. + Setup any state specific to the execution of the given class methods. + """ + super(TestGrantsMonthly, self).setup_method(method) + + org = Organization() + self.lc = LocalCKAN() + + self.lc.action.recombinant_create(dataset_type='grantsmonthly', owner_org=org['name']) + rval = self.lc.action.recombinant_show(dataset_type='grantsmonthly', owner_org=org['name']) + + self.resource_id = rval['resources'][0]['id'] + + def test_example(self): + record = get_chromo('grantsmonthly')['examples']['record'] + self.lc.action.datastore_upsert( + resource_id=self.resource_id, + records=[record]) + + def test_blank(self): + with pytest.raises(ValidationError) as ve: + self.lc.action.datastore_upsert( + resource_id=self.resource_id, + records=[{}]) + err = ve.value.error_dict + assert 'key' in err + assert 'ref_number, amendment_number' in err['key'][0] From 6ff92cc48a643e3d80bdea68ebe637b126d3f0fd Mon Sep 17 00:00:00 2001 From: Jesse Vickery Date: Wed, 5 Mar 2025 15:26:01 +0000 Subject: [PATCH 24/36] fix(syntax): lint; - Flake8 fixes. --- ckanext/canada/tests/test_grants.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ckanext/canada/tests/test_grants.py b/ckanext/canada/tests/test_grants.py index 62ac0afeb..2bf429337 100644 --- a/ckanext/canada/tests/test_grants.py +++ b/ckanext/canada/tests/test_grants.py @@ -47,6 +47,7 @@ def test_empty_string_instead_of_null(self): resource_id=self.resource_id, records=[record]) + # (staging fork only): grants monthly class TestGrantsMonthly(CanadaTestBase): @classmethod From 1b2f8ddeaa5e545e30b1f6c4ddfc0511a717a1d2 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Fri, 31 Oct 2025 15:03:32 -0400 Subject: [PATCH 25/36] Grants monthly pilot, phase 2 --- ckanext/canada/tables/grantsmonthly.yaml | 950 ++++++++++++++++++++--- 1 file changed, 860 insertions(+), 90 deletions(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index 2cc1d6c26..930711463 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -5,7 +5,7 @@ shortname: Grants and Contributions Data Sharing Pilot notes: Access, upload and modify the Grants and Contributions Data Sharing Pilot reports for your organization template_version: 3 -template_updated: 2024-10-25 +template_updated: 2025-11-03 portal_type: info collection: pd @@ -30,7 +30,7 @@ resources: The Reference number is populated by departments. It is a unique reference number given to each entry. Having a unique identifier for each item will allow departments to locate a specific item in the registry should they need to modify or delete. Controlled format; This field is populated in the following format DDD-YYYY-YYYY-MX-XXXXX - 1. DDD represents the department number – See annex A for list of department numbers + 1. DDD represents the department number – Use the same three-digit number as the ‘Departmental Identifier’, which is the department number per the Chart of Accounts list of departments. Ensure you are reviewing the most current year: https://www.tpsgc-pwgsc.gc.ca/recgen/pceaf-gwcoa/2425/txt/rg-3-num-eng.html 2. YYYY-YYYY represents the fiscal year 3. MX represents the fiscal month 4. XXXXX represents the unique number assigned by the department for each entry. @@ -40,16 +40,20 @@ resources: Ce champ est rempli par l’utilisateur. L’identificateur de projet ministériel permet aux ministères d’identifier rapidement les rapports produits dans leur propre système. Les ministères devraient utiliser un chiffre qui est logique pour le ministère. Ces renseignements seront publiés dans le cadre du rapport. Format contrôlé; Ce champ est rempli au format suivant: DDD-YYYY-YYYY-MX-XXXXX - 1. DDD représente le numéro de département - Voir l’annexe A pour la liste des numéros de département. + 1. DDD représente le numéro de département - Utilisez le même numéro à trois chiffres que l’«Identificateur ministériel», qui est le numéro de ministère selon la liste du plan comptable des ministères. Assurez-vous de consulter l’année la plus récente : https://www.tpsgc-pwgsc.gc.ca/recgen/pceaf-gwcoa/2425/txt/rg-3-num-fra.html 2. AAAA-AAAA représente l'année fiscale 3. MX représente le mois fiscal 4. XXXXX représente le numéro unique attribué par le département pour chaque entrée. Par exemple, les numéros de l'exercice 2018-2019 du T1 devraient recevoir les numéros suivants: 001-2018-2019-M1-00001, 001-2018-2019-M1-00002, 001-2018-2019-M1-00003, etc.' - obligation: Mandatory + obligation: + en: Mandatory + fr: Obligatoire excel_required: true form_required: true - format_type: Free text + format_type: + en: Free text + fr: Texte libre datastore_type: text # 3.2 Amendment Number @@ -58,9 +62,21 @@ resources: en: Amendment Number fr: Numéro de modification description: - en: This field is populated by departments and identifies that an amendment is occurring to original information. Use 0 for original records. - fr: Ce champ est rempli par les ministères et indique qu'une modification est apportée aux renseignements originaux. Utiliser 0 pour les enregistrements originaux. - obligation: Mandatory + en: > + This field is populated by departments and identifies that an amendment is + occurring to original information. Use 0 for original records. + The first amendment after the original agreement should be identified as 1, then 2, etc. + Agreement terminations should be identified as another amendment number and report + 'termination' in the 'Additional information' column. + fr: > + Ce champ est rempli par les ministères et indique qu'une modification est apportée + aux renseignements originaux. Utiliser 0 pour les enregistrements originaux. La + première modification après l'accord initial doit être identifiée comme numéro 1, + puis 2, etc. Les résiliations d'accord doivent être identifiées comme un autre numéro + de modification et indiquer 'résiliation' dans la colonne 'Renseignements supplémentaires'. + obligation: + en: Mandatory + fr: Obligatoire excel_required: true form_required: true format_type: Numeric only @@ -90,10 +106,14 @@ resources: description: en: This field is populated by departments and indicates whether the agreement signed is a grant, contribution or other transfer payment. fr: Ce champ est rempli par les ministères et indique si l'entente signée vise une subvention, une contribution ou un autre paiement de transfert. - obligation: Mandatory + obligation: + en: Mandatory + fr: Obligatoire excel_required: true form_required: true - format_type: Controlled List + format_type: + en: Controlled List + fr: Liste contrôlée datastore_type: text choices: G: @@ -114,9 +134,16 @@ resources: description: en: The recipient type helps identify who is receiving the money. fr: Le type de bénéficiaire permet d'identifier qui reçoit l'argent. - obligation: Optional - format_type: Controlled List - datastore_type: text + obligation: + en: Mandatory + fr: Obligatoire + validation: + en: Required if "Agreement Start Date" is on or after November 1st 2025 + fr: Requis si la "date de début de l’entente" est le 1er novembre 2025 ou après + format_type: + en: Controlled List + fr: Liste contrôlée + excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' datastore_type: text choices: F: en: For-profit organizations @@ -152,6 +179,8 @@ resources: en: | The Business Number is a nine digit number issued by the Canada Revenue Agency since 1994. Per the Directive on the Business Number, it has been identified as the standard identifier for all transactions between businesses and the Government of Canada, including transactions linked to grant and/or contribution funding. + This guidance further aligns with the Government of Canada data reference standard on business number: Data reference standard on the business number - Canada.ca (https://www.canada.ca/en/government/system/digital-government/digital-government-innovations/enabling-interoperability/gc-enterprise-data-reference-standards/data-reference-standard-business-number.html) + The business number should be populated for an organization or charity. Real-time validation of business identity information linked to the Business Number, including legal name and operating name, for sole proprietorship, partnerships and incorporations, is available to departments through the Business Number Web Validation Service. For more details contact ic.bnadoptionne.ic@canada.ca. @@ -162,13 +191,40 @@ resources: fr: | Depuis 1994, l’Agence du revenu du Canada émet des numéros d’entreprise à neuf chiffres. Aux termes de la Directive sur le numéro d’entreprise, le numéro d’entreprise constitue l’identificateur standard de toutes les opérations effectuées entre une entreprise et le gouvernement du Canada, y compris les opérations associées à une subvention ou à un financement de contribution. + Cette directive est également conforme à la norme de référence sur les données du numéro d'entreprise du gouvernement du Canada : Norme référentielle relative aux données sur le numéro d’entreprise - Canada.ca (https://www.canada.ca/fr/gouvernement/systeme/gouvernement-numerique/innovations-gouvernementales-numeriques/permettre-interoperabilite/normes-referentielles-pangouvernementales-relatives-donnees-gc/norme-referentielle-relative-donnees-numero-entreprise.html) + Le numéro d’entreprise devrait être consigné pour une organisation ou un organisme de bienfaisance. Les ministères peuvent obtenir la validation en temps réel de l’identité d’une entreprise en saisissant son numéro d’entreprise dans le Service de validation du numéro d’entreprise en ligne, qui inclut le nom légal et le nom commercial pour les entreprises individuelles, les partenariats et les constitutions en personne morale. Si vous voulez obtenir de plus amples renseignements, envoyez un courriel à ic.bnadoptionne.ic@canada.ca. Pour valider un numéro d’entreprise associé à un organisme de bienfaisance, les ministères peuvent effectuer une recherche de base dans la Liste d’organismes de bienfaisance, sur le site Web Canada.ca. Entrez le nom de l’organisme de bienfaisance, puis cliquez sur le bouton de Recherche. Ensuite, cliquez sur le nom de l’organisme de bienfaisance tiré du résultat de la recherche afin de trouver de plus amples renseignements sur l’organisme de bienfaisance (p. ex., le numéro du programme de bienfaisance, le statut de l’organisme de bienfaisance, la date d’entrée en vigueur du statut et la désignation de l’organisme de bienfaisance). Il est impossible de valider le nom légal et le nom commercial au moyen de la fonction de recherche de base. - obligation: Optional - format_type: Free text + obligation: + en: Optional + fr: Facultatif + validation: + en: Must be a 9 digit number if "Agreement Start Date" is on or after November 1st 2025 + fr: Doit être un numéro à neuf chiffres si la "date de début de l’entente" est le 1er novembre 2025 ou après + format_type: + en: Free text - 9 digit number + fr: Texte libre - numéro à neuf chiffres + excel_error_formula: >- + OR( + {default_formula}, + AND( + NOT( + ISBLANK({agreement_start_date}) + ), + VALUE({agreement_start_date})>=DATE(2025,11,1), + OR( + NOT(ISNUMBER(VALUE({cell}))), + LEN(TRIM({cell}))<>9, + MID(TRIM({cell}),1,1)="0", + LEN({cell})-LEN(SUBSTITUTE({cell},"-",""))>0, + LEN({cell})-LEN(SUBSTITUTE({cell},".",""))>0, + LEN({cell})-LEN(SUBSTITUTE({cell},",",""))>0 + ) + ) + ) datastore_type: text # 3.7 Recipient Legal Name @@ -185,10 +241,14 @@ resources: Le nom légal du bénéficiaire se veut complémentaire au champ « Numéro d'entreprise du bénéficiaire ». Cette information devrait être tirée de l'entente de subvention ou de contribution. Traduction seulement si le nom légal est fourni dans les deux langues officielles par le bénéficiaire. Fournir dans le format suivant : nom anglais|nom français. - obligation: Mandatory + obligation: + en: Mandatory + fr: Obligatoire excel_required: true form_required: true - format_type: Free text + format_type: + en: Free text + fr: Texte libre datastore_type: text form_attrs: size: 60 @@ -207,7 +267,12 @@ resources: Le champ « Nom commercial du bénéficiaire » est un champ facultatif utilisé dans le cas d'organisations qui exercent leurs activités sous un nom différent de leur nom légal ou de leur numéro d'entreprise. Dans le cas de chercheurs qui reçoivent leur financement par l'entremise d'une université, cette information doit être entrée ici. Ce champ ne sert pas à saisir le nom du bénéficiaire ultime de la subvention ou de la contribution, mais plutôt celui de la personne qui reçoit le financement du gouvernement du Canada. Traduction seulement si le nom est fourni dans les deux langues officielles par le bénéficiaire. Fournir dans le format suivant : nom anglais|nom français. - format_type: Free text + obligation: + en: Optional + fr: Facultatif + format_type: + en: Free text + fr: Texte libre datastore_type: text form_attrs: size: 60 @@ -220,10 +285,14 @@ resources: description: en: The “Recipient country” is a mandatory field. It is the country in which the recipient resides. fr: Le « Pays du bénéficiaire » est un champ obligatoire qui indique le pays de résidence du bénéficiaire. - obligation: Mandatory + obligation: + en: Mandatory + fr: Obligatoire excel_required: true form_required: true - format_type: Controlled List + format_type: + en: Controlled List + fr: Liste contrôlée datastore_type: text choices_file: choices/country.json @@ -233,10 +302,14 @@ resources: en: Recipient Province or Territory fr: Province ou territoire du bénéficiaire description: - en: The "Recipient province or territory" is a mandatory field that identifies where, within Canada, the recipient resides. - fr: Le champ « province ou territoire du bénéficiaire » est un champ obligatoire qui indique le lieu de résidence du bénéficiaire au Canada. - obligation: Optional - format_type: Controlled List + en: The "Recipient province or territory" is a mandatory field if the Recipient Country is Canada and identifies where, within Canada, the recipient resides. + fr: Le champ « province ou territoire du bénéficiaire » est un champ obligatoire si le pays destinataire est le Canada et indique le lieu de résidence du bénéficiaire au Canada. + obligation: + en: Mandatory if Recipient Country is Canada + fr: Obligatoire si le pays destinataire est le Canada + format_type: + en: Controlled List + fr: Liste contrôlée datastore_type: text excel_cell_required_formula: 'and({column}{row}="",{column_before}{row}="CA")' choices: @@ -298,10 +371,14 @@ resources: Nom officiel exact de la ville, y compris dans les deux langues officielles (le cas échéant) au format suivant : nom anglais|nom français Texte libre, mais une liste contrôlée de la liste des municipalités désignées donataires de l’Agence du revenu du Canada peut être consultée: site Web de l’Agence du revenu du Canada (http://www.cra-arc.gc.ca/chrts-gvng/qlfd-dns/mncplts-fra.html). - obligation: Mandatory + obligation: + en: Mandatory + fr: Obligatoire excel_required: true form_required: true - format_type: Free text + format_type: + en: Free text + fr: Texte libre datastore_type: text form_attrs: size: 60 @@ -315,13 +392,46 @@ resources: en: | The "Recipient postal code" is a mandatory field that serves to identify the specific area in which the recipient operates. In cases where this field cannot be populated this field may be left blank. - Text format locked to "X#X #X#"; The Canada Post tool for looking up a postal code can be found on the Canada Post website. + Should be in the format "A1A 1A1"; The Canada Post tool for looking up a postal code can be found on the Canada Post website. fr: | Le « Code postal du bénéficiaire » est un champ obligatoire qui sert à identifier avec précision la région où le bénéficiaire exerce ses activités. Si le fait de remplir ce champ suscite des préoccupations à l'égard de la vie privée, il est possible de le laisser vide. - Format de texte : "X#X #X#"; L'outil de Postes Canada permettant de rechercher un code postal se trouve sur le site Web de Postes Canada. - obligation: Optional - format_type: "Text format locked to (X#X #X#)" + Devrait être selon le format « A1A 1A1 »; L'outil de Postes Canada permettant de rechercher un code postal se trouve sur le site Web de Postes Canada. + obligation: + en: Optional + fr: Facultatif + validation: + en: Must be in the format "A1A 1A1" if "Agreement Start Date" is on or after November 1st 2025 + fr: Doit être selon le format « A1A 1A1 » si la "date de début de l’entente" est le 1er novembre 2025 ou après + excel_error_formula: >- + OR( + {default_formula}, + AND( + NOT( + ISBLANK({agreement_start_date}) + ), + VALUE({agreement_start_date})>=DATE(2025,11,1), + OR( + LEFT(TRIM({cell}),3)&" "&RIGHT(TRIM({cell}),3)<>TRIM({cell}), + CODE(UPPER(MID({cell},1,1)))>CODE("Z"), + CODE(UPPER(MID({cell},1,1)))CODE("Z"), + CODE(UPPER(MID({cell},3,1)))CODE("Z"), + CODE(UPPER(MID({cell},6,1)))" ", + NOT( + ISNUMBER( + VALUE( + MID({cell},2,1)& + MID({cell},5,1)& + MID({cell},7,1) + ) + ) + ) + ) + ) + ) datastore_type: text # 3.13 Federal Riding Number @@ -330,10 +440,35 @@ resources: en: Federal Riding Number fr: Numéro de la circonscription fédérale description: - en: The federal riding number is based on the riding in which the recipient resides. Departments can consult the Elections Canada website in order to retrieve the federal riding number. http://www.elections.ca/content.aspx?section=res&dir=cir/list&document=index338&lang=e - fr: Numéro de la circonscription fédérale où réside le bénéficiaire. Les départements peuvent consulter le site-web d’Élections Canada pour trouver le numéro de la circonscription fédérale. http://www.elections.ca/content.aspx?section=res&dir=cir/list&document=index338&lang=f - obligation: Optional - format_type: Free text + en: The federal riding number is based on the riding in which the recipient resides. Departments can consult the Elections Canada website in order to retrieve the federal riding number. http://www.elections.ca/content.aspx?section=res&dir=cir/list&document=index338&lang=e + fr: Numéro de la circonscription fédérale où réside le bénéficiaire. Les départements peuvent consulter le site-web d’Élections Canada pour trouver le numéro de la circonscription fédérale. http://www.elections.ca/content.aspx?section=res&dir=cir/list&document=index338&lang=f + obligation: + en: Optional + fr: Facultatif + validation: + en: Must be a 5 digit number if "Agreement Start Date" is on or after November 1st 2025 + fr: Doit être un numéro à cinq chiffres si la "date de début de l’entente" est le 1er novembre 2025 ou après + format_type: + en: Text - 5 digit number + fr: Texte - numéro à cinq chiffres + excel_error_formula: >- + OR( + {default_formula}, + AND( + NOT( + ISBLANK({agreement_start_date}) + ), + VALUE({agreement_start_date})>=DATE(2025,11,1), + OR( + NOT(ISNUMBER(VALUE({cell}))), + LEN(TRIM({cell}))<>5, + MID(TRIM({cell}),1,1)="0", + LEN({cell})-LEN(SUBSTITUTE({cell},"-",""))>0, + LEN({cell})-LEN(SUBSTITUTE({cell},".",""))>0, + LEN({cell})-LEN(SUBSTITUTE({cell},",",""))>0 + ) + ) + ) datastore_type: text # 3.14 Program Name (English) @@ -344,13 +479,21 @@ resources: description: en: The program name is the name of the program, according to the terms and conditions (Ts&Cs), under which a recipient is funded. fr: Le nom du programme selon les modalités en vertu desquelles le financement est versé au bénéficiaire. - obligation: Optional - format_type: Free text + obligation: + en: Mandatory + fr: Obligatoire + validation: + en: Required if "Agreement Start Date" is on or after November 1st 2025 + fr: Requis si la "date de début de l’entente" est le 1er novembre 2025 ou après + format_type: + en: Free text + fr: Texte libre + excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' datastore_type: text form_attrs: size: 60 - # 3.15 Program Name (French) + # 3.17 Program Name (French) - datastore_id: prog_name_fr label: en: Program Name (French) @@ -358,13 +501,21 @@ resources: description: en: The program name is the name of the program, according to the terms and conditions (Ts&Cs), under which a recipient is funded. fr: Le nom du programme selon les modalités en vertu desquelles le financement est versé au bénéficiaire. - obligation: Optional - format_type: Free text + obligation: + en: Mandatory + fr: Obligatoire + validation: + en: Required if "Agreement Start Date" is on or after November 1st 2025 + fr: Requis si la "date de début de l’entente" est le 1er novembre 2025 ou après + format_type: + en: Free text + fr: Texte libre + excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' datastore_type: text form_attrs: size: 60 - # 3.16 Program Purpose (English) + # 3.18 Program Purpose (English) - datastore_id: prog_purpose_en label: en: Program Purpose (English) @@ -372,14 +523,22 @@ resources: description: en: The program purpose is the program’s purpose according to the Ts&Cs. fr: Le but du programme est celui dans lequel le programme a été créé, selon les modalités du programme. - obligation: Optional - format_type: Free text + obligation: + en: Mandatory + fr: Obligatoire + validation: + en: Required if "Agreement Start Date" is on or after November 1st 2025 + fr: Requis si la "date de début de l’entente" est le 1er novembre 2025 ou après + format_type: + en: Free text + fr: Texte libre + excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' datastore_type: text form_snippet: scheming/form_snippets/textarea.html form_attrs: style: "width: 100%; display: block" - # 3.17 Program Purpose (French) + # 3.19 Program Purpose (French) - datastore_id: prog_purpose_fr label: en: Program Purpose (French) @@ -387,14 +546,66 @@ resources: description: en: The program purpose is the program’s purpose according to the Ts&Cs. fr: Le but du programme est celui dans lequel le programme a été créé, selon les modalités du programme. - obligation: Optional - format_type: Free text + obligation: + en: Mandatory + fr: Obligatoire + validation: + en: Required if "Agreement Start Date" is on or after November 1st 2025 + fr: Requis si la "date de début de l’entente" est le 1er novembre 2025 ou après + format_type: + en: Free text + fr: Texte libre + excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' datastore_type: text form_snippet: scheming/form_snippets/textarea.html form_attrs: style: "width: 100%; display: block" - # 3.18 Agreement Number + # 3.20 Agreement Title (English) (formerly proj_name_en) + - datastore_id: agreement_title_en + label: + en: Agreement Title (English) + fr: Titre de l’entente (anglais) + description: + en: The agreement title is the title of the project or agreement that the recipient is undertaking. In cases where there is no title, the agreement number will be duplicated here. + fr: Le nom de l'entente est le titre du projet ou de l'entente à l'égard duquel s'engage le bénéficiaire. S'il n'y a pas de titre, le numéro de l'entente peut être réinscrit ici. + obligation: + en: Mandatory + fr: Obligatoire + validation: + en: Required if "Agreement Start Date" is on or after November 1st 2025 + fr: Requis si la "date de début de l’entente" est le 1er novembre 2025 ou après + format_type: + en: Free text + fr: Texte libre + excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' + datastore_type: text + form_attrs: + size: 60 + + # 3.21 Agreement Title (French) (formerly proj_name_fr) + - datastore_id: agreement_title_fr + label: + en: Agreement Title (French) + fr: Titre de l’entente (français) + description: + en: The agreement title is the title of the project or agreement that the recipient is undertaking. In cases where there is no title, the agreement number will be duplicated here. + fr: Le nom de l'entente est le titre du projet ou de l'entente à l'égard duquel s'engage le bénéficiaire. S'il n'y a pas de titre, le numéro de l'entente peut être réinscrit ici. + obligation: + en: Mandatory + fr: Obligatoire + validation: + en: Required if "Agreement Start Date" is on or after November 1st 2025 + fr: Requis si la "date de début de l’entente" est le 1er novembre 2025 ou après + format_type: + en: Free text + fr: Texte libre + excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' + datastore_type: text + form_attrs: + size: 60 + + # 3.22 Agreement Number - datastore_id: agreement_number label: en: Agreement Number @@ -402,23 +613,56 @@ resources: description: en: The agreement number should be the number on the agreement and/or in the departmental Gs&Cs system. fr: Le numéro de l'entente est celui qui figure à l'entente et/ou dans le système de subventions et de contributions du ministère. - obligation: Optional - format_type: Free text + obligation: + en: Optional + fr: Facultatif + format_type: + en: Free text + fr: Texte libre datastore_type: text - # 3.19 Agreement Value in CAD + # 3.23 Agreement Value in CAD - datastore_id: agreement_value label: en: Agreement Value in CAD fr: Valeur de l’entente en dollars canadiens description: - en: The agreement value is the dollar amount stated in the grant or contribution agreement. This field should be populated with a monetary value in Canadian dollars. - fr: La valeur de l'entente est le montant en dollars indiqué dans l'entente de subvention ou de contribution. Ce champ doit indiquer une valeur monétaire en dollars canadiens. - obligation: Mandatory + en: > + The agreement value is the dollar amount stated in the grant or contribution agreement. + This field should be populated with a monetary value in Canadian dollars. This field + should report on the total grant or contribution value, and not the change in agreement value. + fr: > + La valeur de l'entente est le montant en dollars indiqué dans l'entente de subvention ou + de contribution. Ce champ doit indiquer une valeur monétaire en dollars canadiens. Ce champ + doit indiquer la valeur totale de la subvention ou de la contribution, et non la variation de + la valeur de l'accord. + obligation: + en: Mandatory + fr: Obligatoire + validation: + en: | + This field must not be empty. + The number must be greater than 0. + fr: | + Ce champ ne doit pas être vide. + Le nombre doit être supérieur à 0. excel_required: true form_required: true datastore_type: money - + excel_error_formula: >- + OR( + {default_formula}, + AND( + NOT( + ISBLANK({agreement_start_date}) + ), + VALUE({agreement_start_date})>=DATE(2025,11,1), + OR( + NOT(ISNUMBER(VALUE({cell}))), + NOT(VALUE({cell})>0) + ) + ) + ) solr_dollar_range_facet: - 10000 - 25000 @@ -426,25 +670,43 @@ resources: - 1000000 - 5000000 - # 3.20 Agreement Start Date + # 3.24 Agreement Start Date - datastore_id: agreement_start_date label: en: Agreement Start Date fr: Date de début de l’entente description: - en: The agreement start date is the assumed start of the agreement, or when the project is supposed to begin, as captured in the initial agreement. - fr: La date de début de l'entente est la date d'entrée en vigueur présumée de l'entente ou la date à laquelle le projet est censé commencer, conformément à l'entente initiale. - obligation: Mandatory + en: | + The agreement start date is the assumed start of the agreement, normally identified based on the last date of signature, as captured in the initial agreement. + + This date should identify the start of the funding agreement, and not the date of the grant or contribution project. + fr: | + La date de début de l'entente est la date d'entrée en vigueur présumée de l'entente, commence généralement à être identifié en fonction de la dernière date de signature, conformément à l'entente initiale. + + Cette date doit indiquer le début de l'accord de financement, et non la date du projet de subvention ou de contribution. + obligation: + en: Mandatory + fr: Obligatoire + validation: + en: | + This field must not be empty. + Date can’t be in the future. + fr: | + Ce champ ne doit pas être vide. + La date ne doit pas être dans le futur. excel_required: true form_required: true form_snippet: scheming/form_snippets/date.html - format_type: Date (Please format the data as YYYY-MM-DD) + format_type: + en: Date (Please format the date as YYYY-MM-DD) + fr: "Date (Veuillez utiliser le format de date suivant : AAAA-MM-JJ)" + excel_error_formula: 'OR({default_formula},{cell}>TODAY(),AND(NOT(ISBLANK({cell})),NOT(ISBLANK({agreement_end_date})),{cell}>{agreement_end_date}))' datastore_type: date extract_date_year: true extract_date_month: true extract_date_clean: true - # 3.21 Projected Agreement End Date + # 3.25 Projected Agreement End Date - datastore_id: agreement_end_date label: en: Projected Agreement End Date @@ -452,12 +714,21 @@ resources: description: en: The projected agreement end date is the assumed end of the agreement, or when the project is supposed to end, as captured in the initial agreement. fr: La date de fin prévue de l'entente est la date de fin présumée de l'entente, ou la date à laquelle le projet est censé prendre fin, conformément à l'entente initiale. - obligation: Optional - format_type: Date (Please format the data as YYYY-MM-DD) + obligation: + en: Mandatory + fr: Obligatoire + validation: + en: Required if "Agreement Start Date" is on or after November 1st 2025. + fr: Requis si la "date de début de l’entente" est le 1er novembre 2025 ou après. + format_type: + en: Date (Please format the date as YYYY-MM-DD) + fr: "Date (Veuillez utiliser le format de date suivant : AAAA-MM-JJ)" + excel_error_formula: 'OR({default_formula},AND(NOT(ISBLANK({agreement_start_date})),NOT(ISBLANK({cell})),{cell}<{agreement_start_date}))' + excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' datastore_type: date form_snippet: scheming/form_snippets/date.html - # 3.22 Description (English) + # 3.26 Description (English) - datastore_id: description_en label: en: Description (English) @@ -465,16 +736,20 @@ resources: description: en: The description explains why the recipient received funding. It should provide a brief yet accurate description of what the recipient is undertaking. fr: La description explique à quelles fins le bénéficiaire a reçu le financement. Elle doit décrire de façon brève, mais explicite, en quoi consistent les travaux du bénéficiaire. - obligation: Mandatory + obligation: + en: Mandatory + fr: Obligatoire excel_required: true form_required: true - format_type: Free text + format_type: + en: Free text + fr: Texte libre datastore_type: text form_snippet: scheming/form_snippets/textarea.html form_attrs: style: "width: 100%; display: block" - # 3.23 Description (French) + # 3.27 Description (French) - datastore_id: description_fr label: en: Description (French) @@ -482,16 +757,56 @@ resources: description: en: The description explains why the recipient received funding. It should provide a brief yet accurate description of what the recipient is undertaking. fr: La description explique à quelles fins le bénéficiaire a reçu le financement. Elle doit décrire de façon brève, mais explicite, en quoi consistent les travaux du bénéficiaire. - obligation: Mandatory + obligation: + en: Mandatory + fr: Obligatoire excel_required: true form_required: true - format_type: Free text + format_type: + en: Free text + fr: Texte libre datastore_type: text form_snippet: scheming/form_snippets/textarea.html form_attrs: style: "width: 100%; display: block" - # 3.24 Expected Results or Intended Outcome (English) + # 3.28 NAICS Identifier (New Field) + - datastore_id: naics_identifier + label: + en: NAICS Identifier + fr: Identificateur du SCIAN + description: + en: The North American Industry Classification System (NAICS) is an industry classification system developed by the statistical agencies of Canada, Mexico and the United States. + fr: Le Système de classification des industries de l'Amérique du Nord (SCIAN) est un système de classification des industries conçu par les organismes statistiques du Canada, du Mexique et des États-Unis. + obligation: + en: Optional + fr: Facultatif + format_type: + en: | + Free text based on controlled list from Statistics Canada; This list is available to users on the Statistics Canada website. http://www.statcan.gc.ca/eng/subjects/standard/naics/2012/index + + The “NAICS identifier” field should be populated with the most appropriate choice in the selection list. Departments should consult the Statistics Canada website and populate at their own discretion. At least 3 digits should be entered to allow for broad coding when specificity is not possible. + + For example, if Employment and Social Development Canada is signing an agreement with an educational support services organization, the NAICS identifier would be 611710. The identifier is broken down as follows: + + • sector: 61 (educational services) + • subsector: 1 (educational services) + • industry group: 7 (educational support services) + • industry: 10 (educational support services) + fr: | + Texte libre basé sur une liste contrôlée de Statistique Canada; cette liste est disponible pour les utilisateurs sur le site Web de Statistique Canada. https://www.statcan.gc.ca/fr/sujets/norme/scian/2012/index + + Le champ « Identifiant SCIAN » doit être rempli avec le choix le plus approprié dans la liste de sélection. Les ministères doivent consulter le site Web de Statistique Canada et le remplir à leur guise. Au moins trois chiffres doivent être saisis pour permettre un codage large lorsque la spécificité n’est pas possible. + + Par exemple, si Emploi et Développement social Canada signe un accord avec un organisme de services de soutien à l’éducation, l’identifiant SCIAN sera 611710. L’identifiant se décompose comme suit : + + • secteur : 61 (services d’enseignement); + • sous-secteur : 1 (services d’enseignement); + • groupe industriel : 7 (services de soutien à l’enseignement); + • industrie : 10 (services de soutien à l’enseignement). + datastore_type: text + + # 3.29 Expected Results or Intended Outcome (English) - datastore_id: expected_results_en label: en: Expected Results or Intended Outcome (English) @@ -499,14 +814,22 @@ resources: description: en: The expected results or intended outcome is the assumed result of project completion. It should be populated in accordance with the project that the recipient is undertaking or the program under which it is funded. This field will attempt to explain why the project is being undertaken, and what the final results should be. fr: Les résultats attendus ou visés sont les résultats présumés qui découlent de l'exécution d'un projet. Le champ doit être rempli en fonction du projet qu'entreprend le bénéficiaire ou conformément au programme en vertu duquel il est financé. Ce champ vise à offrir une description de la raisond'être du projet et de ce que devraient être les résultats finaux. - obligation: Optional - format_type: Free text + obligation: + en: Mandatory + fr: Obligatoire + validation: + en: Required if "Agreement Start Date" is on or after November 1st 2025 + fr: Requis si la "date de début de l’entente" est le 1er novembre 2025 ou après + format_type: + en: Free text + fr: Texte libre + excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' datastore_type: text form_snippet: scheming/form_snippets/textarea.html form_attrs: style: "width: 100%; display: block" - # 3.25 Expected Results or Intended Outcome (French) + # 3.30 Expected Results or Intended Outcome (French) - datastore_id: expected_results_fr label: en: Expected Results or Intended Outcome (French) @@ -514,14 +837,112 @@ resources: description: en: The expected results or intended outcome is the assumed result of project completion. It should be populated in accordance with the project that the recipient is undertaking or the program under which it is funded. This field will attempt to explain why the project is being undertaken, and what the final results should be. fr: Les résultats attendus ou visés sont les résultats présumés qui découlent de l'exécution d'un projet. Le champ doit être rempli en fonction du projet qu'entreprend le bénéficiaire ou conformément au programme en vertu duquel il est financé. Ce champ vise à offrir une description de la raisond'être du projet et de ce que devraient être les résultats finaux. - obligation: Optional - format_type: Free text + obligation: + en: Mandatory + fr: Obligatoire + validation: + en: Required if "Agreement Start Date" is on or after November 1st 2025 + fr: Requis si la "date de début de l’entente" est le 1er novembre 2025 ou après + format_type: + en: Free text + fr: Texte libre + excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' datastore_type: text form_snippet: scheming/form_snippets/textarea.html form_attrs: style: "width: 100%; display: block" - # 3.26 Demographic of the ultimate beneficiary + # 3.31 Additional Information (English) (Formerly comments_en, additional_info_en) + - datastore_id: additional_information_en + label: + en: Additional Information (English) + fr: Renseignements supplémentaires (anglais) + description: + en: | + Additional information is information that departments are required to enter under the guidance instructions for exceptions but that is not captured in any of the aforementioned fields. It may contain information on: + + • additional funding departments + • funding through a third party + • ministerial announcements + • research fields + • joint funding + • collaborators and partners + • keywords + • belated reporting + • novation agreements + • terminations + • repayability + fr: | + Lorsqu'ils sont tenus de le faire conformément aux « Indications » qui traitent des exceptions, les ministères doivent entrer ici les renseignements supplémentaires qui ne sont pas saisis dans les champs précédents. Il peut s'agir de renseignements comme ceux-ci : + + • autres ministères participent au financement; + • financement par l'intermédiaire d'un tiers; + • annonces ministérielles; + • domaines de recherche; + • financement conjoint; + • collaborateurs et partenaires; + • mots-clés; + • divulgation tardive; + • entente d'innovation; + • résiliations; + • remboursement. + obligation: + en: Optional + fr: Facultatif + format_type: + en: Free text + fr: Texte libre + datastore_type: text + form_snippet: scheming/form_snippets/textarea.html + form_attrs: + class: form-control canada-width-full d-block + + # 3.32 Additional Information (French) (Formerly comments_fr, additional_info_fr) + - datastore_id: additional_information_fr + label: + en: Additional Information (French) + fr: Renseignements supplémentaires (français) + description: + en: | + Additional information is information that departments are required to enter under the guidance instructions for exceptions but that is not captured in any of the aforementioned fields. It may contain information on: + + • additional funding departments + • funding through a third party + • ministerial announcements + • research fields + • joint funding + • collaborators and partners + • keywords + • belated reporting + • novation agreements + • terminations + • repayability + fr: | + Lorsqu'ils sont tenus de le faire conformément aux « Indications » qui traitent des exceptions, les ministères doivent entrer ici les renseignements supplémentaires qui ne sont pas saisis dans les champs précédents. Il peut s'agir de renseignements comme ceux-ci : + + • autres ministères participent au financement; + • financement par l'intermédiaire d'un tiers; + • annonces ministérielles; + • domaines de recherche; + • financement conjoint; + • collaborateurs et partenaires; + • mots-clés; + • divulgation tardive; + • entente d'innovation; + • résiliations; + • remboursement. + obligation: + en: Optional + fr: Facultatif + format_type: + en: Free text + fr: Texte libre + datastore_type: text + form_snippet: scheming/form_snippets/textarea.html + form_attrs: + class: form-control canada-width-full d-block + + # 3.33 Demographic of the ultimate beneficiary - datastore_id: dem_intended_beneficiary label: en: Ultimate Beneficiary demographic group @@ -529,12 +950,16 @@ resources: description: en: The field indicates whether the ultimate beneficiaries belong to a specific demographic group. fr: Le champ indique si les bénéficiaires ultimes font partie d’un groupe démographique identifié. - obligation: Mandatory + obligation: + en: Optional + fr: Facultatif occurrence: Repeatable excel_required: true form_required: true excel_full_text_choices: true - format_type: Controlled List + format_type: + en: Controlled List + fr: Liste contrôlée validation: en: This field must not be empty. fr: Ce champ ne doit pas être vide. @@ -587,7 +1012,7 @@ resources: fr: Collecté mais confidentiel order: 11 - # 3.27 Other Demographic of ultimate beneficiary Description (English) + # 3.34 Other Demographic of ultimate beneficiary Description (English) - datastore_id: other_dem_intended_beneficiary_description_en label: en: Demographic of ultimate beneficiary Description (English) @@ -613,7 +1038,9 @@ resources: en: This field has a maximum length of 1800 characters. This text must be provided in both languages. fr: Ce champ ne peut excéder une longueur maximale de 1800 caractères. Ce texte doit être fourni en anglais et en français. occurrence: Single - format_type: Free text + format_type: + en: Free text + fr: Texte libre datastore_type: text max_chars: 1800 excel_required_formula: 'OR(TRIM(LEFT({dem_intended_beneficiary},FIND(":",{dem_intended_beneficiary}&":")-1))="O",NOT(ISBLANK({other_dem_intended_beneficiary_description_fr})))' @@ -621,7 +1048,7 @@ resources: style: "width: 100%; display: block" maxlength: 1800 - # 3.28 Other Demographic of ultimate beneficiary Description (French) + # 3.35 Other Demographic of ultimate beneficiary Description (French) - datastore_id: other_dem_intended_beneficiary_description_fr label: en: Demographic of ultimate beneficiary Description (French) @@ -647,7 +1074,9 @@ resources: en: This field has a maximum length of 1800 characters. This text must be provided in both languages. fr: Ce champ ne peut excéder une longueur maximale de 1800 caractères. Ce texte doit être fourni en anglais et en français. occurrence: Single - format_type: Free text + format_type: + en: Free text + fr: Texte libre datastore_type: text max_chars: 1800 excel_required_formula: 'OR(TRIM(LEFT({dem_intended_beneficiary},FIND(":",{dem_intended_beneficiary}&":")-1))="O",NOT(ISBLANK({other_dem_intended_beneficiary_description_en})))' @@ -655,7 +1084,7 @@ resources: style: "width: 100%; display: block" maxlength: 1800 - # 3.29 Reason for the amendment + # 3.36 Reason for the amendment - datastore_id: reason_amendment label: en: Reason for the amendment @@ -663,11 +1092,15 @@ resources: description: en: The field indicates the reason for the amendment to the project. fr: Le champ indique la raison pour le changement au projet. - obligation: Mandatory + obligation: + en: Optional + fr: Facultatif occurrence: Repeatable excel_required: true form_required: true - format_type: Controlled List + format_type: + en: Controlled List + fr: Liste contrôlée validation: en: This field must not be empty. fr: Ce champ ne doit pas être vide. @@ -701,7 +1134,7 @@ resources: fr: Inconnu order: 6 - # 3.30 Reason for amendment Description (English) + # 3.37 Reason for amendment Description (English) - datastore_id: other_reason_amendment_en label: en: Reason for amendment Description (English) @@ -728,7 +1161,9 @@ resources: en: This field has a maximum length of 1800 characters. This text must be provided in both languages. fr: Ce champ ne peut excéder une longueur maximale de 1800 caractères. Ce texte doit être fourni en anglais et en français. occurrence: Single - format_type: Free text + format_type: + en: Free text + fr: Texte libre datastore_type: text max_chars: 1800 excel_required_formula: 'OR(TRIM(LEFT({reason_amendment},FIND(":",{reason_amendment}&":")-1))="O",NOT(ISBLANK({other_reason_amendment_fr})))' @@ -736,7 +1171,7 @@ resources: style: "width: 100%; display: block" maxlength: 1800 - # 3.31 Reason for amendment Description (French) + # 3.38 Reason for amendment Description (French) - datastore_id: other_reason_amendment_fr label: en: Reason for amendment Description (French) @@ -763,7 +1198,9 @@ resources: en: This field has a maximum length of 1800 characters. This text must be provided in both languages. fr: Ce champ ne peut excéder une longueur maximale de 1800 caractères. Ce texte doit être fourni en anglais et en français. occurrence: Single - format_type: Free text + format_type: + en: Free text + fr: Texte libre datastore_type: text max_chars: 1800 excel_required_formula: 'OR(TRIM(LEFT({reason_amendment},FIND(":",{reason_amendment}&":")-1))="O",NOT(ISBLANK({other_reason_amendment_en})))' @@ -771,7 +1208,7 @@ resources: style: "width: 100%; display: block" maxlength: 1800 - # 3.32 Risk rating + # 3.39 Risk rating - datastore_id: rating_risk label: en: Risk rating @@ -793,11 +1230,15 @@ resources: Une évaluation « moyenne » indique que le département a identifié un niveau de risque modéré, pour lequel un suivi ou un soutien supplémentaire peut être nécessaire afin de garantir la conformité et la réussite du programme. Une évaluation « élevée » indique que le département a identifié un niveau de risque substantiel, avec des préoccupations importantes concernant la situation financière du bénéficiaire, sa capacite organisationnelle et sa conformité aux accords précédents. En conséquence, une surveillance intensive ou des conditions spécifiques peuvent nécessiter pour atténuer les problèmes potentiels. - obligation: Mandatory + obligation: + en: Optional + fr: Facultatif occurrence: Single excel_required: true form_required: true - format_type: Controlled List + format_type: + en: Controlled List + fr: Liste contrôlée validation: en: This field must not be empty. fr: Ce champ ne doit pas être vide. @@ -826,6 +1267,335 @@ resources: fr: Confidentiel order: 5 + # 3.39 Recipient Risk Flag – Money currently owed to Crown + - datastore_id: recipient_risk_flag_crown + label: + en: Recipient Risk Flag – Money currently owed to Crown + fr: (FR) Recipient Risk Flag – Money currently owed to Crown + description: + en: | + Use this field to assess whether the recipient has any history or currently instances of owing money to the Crown (to your department) related to this funding agreement, or on other funding agreements in your organizations (based on your department’s history with this recipient). + • Select "Yes" if the recipient has previously owned or currently owes money to the Crown (e.g., outstanding debt to your department or other federal entities) related to any funding agreements. + • Select "No" if the recipient has no known history of owing money to the Crown and there are no current outstanding debts. + • Select "NA – Not Applicable" if this is a newly signed funding agreement with a first-time recipient.. + • Select “Unknown” if you do not have this information (i.e. you do not track this information, or it was unavailable for reporting at this time). + fr: | + (FR) + Use this field to assess whether the recipient has any history or currently instances of owingowes money to the Crown (to your department) related to this funding agreement, or on other funding agreements in your organizations (based on your department’s history with this recipient). + • Select "Yes" if the recipient has previously owned or currently owes money to the Crown (e.g., outstanding debt to your department or other federal entities) related to any funding agreements. + • Select "No" if the recipient has no known history of owing money to the Crown and there are no current outstanding debts. + • Select "NA – Not Applicable" if this is a newly signed funding agreement with a first-time recipient.. + • Select “Unknown” if you do not have this information (i.e. you do not track this information, or it was unavailable for reporting at this time). + obligation: + en: Mandatory + fr: Obligatoire + occurrence: Single + excel_required: true + form_required: true + format_type: + en: Controlled List + fr: Liste contrôlée + validation: + en: This field must not be empty. + fr: Ce champ ne doit pas être vide. + datastore_type: text + excel_full_text_choices: true + choice_order_expression: 'value.get("order", False), code' + choices: + Y: + en: Yes + fr: Oui + order: 1 + N: + en: No + fr: Non + order: 2 + NA: + en: Not applicable + fr: Sans objet + order: 3 + U: + en: Unknown + fr: Inconnue + order: 4 + + # 3.40 Recipient Risk Flag – Agreement compliance issue + - datastore_id: recipient_risk_flag_compliance + label: + en: Recipient Risk Flag – Agreement compliance issue + fr: (FR) Recipient Risk Flag – Agreement compliance issue + description: + en: | + Use this field to assess whether there are ongoing or historical compliance issues associated with the recipient of this funding agreement (e.g. improper use of funds, unauthorized change of scope). + • Select "Yes" if the recipient has a history of non-compliance with previous funding agreements, or if compliance issues have been identified during the current funding agreement. + • Select "No" if the recipient has remained compliant under the current funding agreement and there are no known compliance issues from past agreements. + • Select "N/A – Not Applicable" if this is a newly signed funding agreement with a first-time recipient. + • Select “Unknown” if you do not have this information (i.e. you do not track this information, or it was unavailable for reporting at this time). + fr: | + (FR) + Use this field to assess whether there are ongoing or historical compliance issues associated with the recipient of this funding agreement (e.g. improper use of funds, unauthorized change of scope). + • Select "Yes" if the recipient has a history of non-compliance with previous funding agreements, or if compliance issues have been identified during the current funding agreement. + • Select "No" if the recipient has remained compliant under the current funding agreement and there are no known compliance issues from past agreements. + • Select "N/A – Not Applicable" if this is a newly signed funding agreement with a first-time recipient. + • Select “Unknown” if you do not have this information (i.e. you do not track this information, or it was unavailable for reporting at this time). + obligation: + en: Mandatory + fr: Obligatoire + occurrence: Single + excel_required: true + form_required: true + format_type: + en: Controlled List + fr: Liste contrôlée + validation: + en: This field must not be empty. + fr: Ce champ ne doit pas être vide. + datastore_type: text + excel_full_text_choices: true + choice_order_expression: 'value.get("order", False), code' + choices: + Y: + en: Yes + fr: Oui + order: 1 + N: + en: No + fr: Non + order: 2 + NA: + en: Not applicable + fr: Sans objet + order: 3 + U: + en: Unknown + fr: Inconnue + order: 4 + + # 3.41 Recipient Risk Flag – Agreement Close-out issues + - datastore_id: recipient_risk_flag_agreement + label: + en: Recipient Risk Flag – Agreement Close-out issues + fr: (FR) Recipient Risk Flag – Agreement Close-out issues + description: + en: | + Use this field to assess whether the recipient has experienced any issues during the close-out phase of previous or current funding agreements. + • Select "Yes" if the recipient has a history of close-out issues with previous funding agreements (e.g., delays in final reporting, unresolved deliverables, financial reconciliation problems), or if such issues have been identified during the close-out of the current agreement. + • Select "No" if the recipient has successfully completed close-out requirements for previous and/or current funding agreements without any known issues. + • Select "N/A – Not Applicable" if this is a newly signed agreement with a first-time recipient, or if the funding agreement is still active and has not yet reached the close-out phase. + • Select “Unknown” if you do not have this information (i.e. you do not track this information, or it was unavailable for reporting at this time). + fr: | + (FR) + Use this field to assess whether the recipient has experienced any issues during the close-out phase of previous or current funding agreements. + • Select "Yes" if the recipient has a history of close-out issues with previous funding agreements (e.g., delays in final reporting, unresolved deliverables, financial reconciliation problems), or if such issues have been identified during the close-out of the current agreement. + • Select "No" if the recipient has successfully completed close-out requirements for previous and/or current funding agreements without any known issues. + • Select "N/A – Not Applicable" if this is a newly signed agreement with a first-time recipient, or if the funding agreement is still active and has not yet reached the close-out phase. + • Select “Unknown” if you do not have this information (i.e. you do not track this information, or it was unavailable for reporting at this time). + obligation: + en: Mandatory + fr: Obligatoire + occurrence: Single + excel_required: true + form_required: true + format_type: + en: Controlled List + fr: Liste contrôlée + validation: + en: This field must not be empty. + fr: Ce champ ne doit pas être vide. + datastore_type: text + excel_full_text_choices: true + choice_order_expression: 'value.get("order", False), code' + choices: + Y: + en: Yes + fr: Oui + order: 1 + N: + en: No + fr: Non + order: 2 + NA: + en: Not applicable + fr: Sans objet + order: 3 + U: + en: Unknown + fr: Inconnue + order: 4 + + # 3.42 Contact Information for Funding Agreement + - datastore_id: recipient_risk_flag_agreement + label: + en: Contact Information for Funding Agreement + fr: (FR) Contact Information for Funding Agreement + description: + en: | + Provide the primary email address for inquiries related to this funding agreement. This contact will be used to facilitate communication between departments and agencies (e.g. clarify agreement scope, coordinate on common recipients, or address operational questions, etc.). + You may choose to provide one of the following, based on your program’s communication practices: + • A generic program inbox + • The work email address of the program manager + • The work email address of the program officer responsible for this agreement + Ensure the selected contact is actively monitored and appropriate for interdepartmental correspondence. + fr: | + (FR) + Provide the primary email address for inquiries related to this funding agreement. This contact will be used to facilitate communication between departments and agencies (e.g. clarify agreement scope, coordinate on common recipients, or address operational questions, etc.). + You may choose to provide one of the following, based on your program’s communication practices: + • A generic program inbox + • The work email address of the program manager + • The work email address of the program officer responsible for this agreement + Ensure the selected contact is actively monitored and appropriate for interdepartmental correspondence. + obligation: + en: Mandatory + fr: Obligatoire + occurrence: Single + excel_required: true + form_required: true + format_type: + en: Email + fr: Courriel + validation: + en: This field must not be empty. + fr: Ce champ ne doit pas être vide. + datastore_type: text + excel_full_text_choices: true + + # 3.43 Recipient Risk Flag – Agreement Close-out issues + - datastore_id: multi_funding_indicator + label: + en: Multi-Program Funding Indicator + fr: (FR) Multi-Program Funding Indicator + description: + en: | + Use this field to identify whether the funding agreement includes financial contributions from more than one grant and contribution program. + • Select "Yes" if the agreement consolidates funding from multiple grant and contribution programs, either within the same department or across different departments or agencies. + • Select "No" if the agreement is funded by a single grant and contribution program only. + fr: | + (FR) + Use this field to identify whether the funding agreement includes financial contributions from more than one grant and contribution program. + • Select "Yes" if the agreement consolidates funding from multiple grant and contribution programs, either within the same department or across different departments or agencies. + • Select "No" if the agreement is funded by a single grant and contribution program only. + obligation: + en: Mandatory + fr: Obligatoire + occurrence: Single + excel_required: true + form_required: true + format_type: + en: Controlled List + fr: Liste contrôlée + validation: + en: This field must not be empty. + fr: Ce champ ne doit pas être vide. + datastore_type: text + excel_full_text_choices: true + choice_order_expression: 'value.get("order", False), code' + choices: + Y: + en: Yes + fr: Oui + order: 1 + N: + en: No + fr: Non + order: 2 + + # 3.44 Multi-Recipient Agreement Indicator + - datastore_id: multi_recipient_agreement_indicator + label: + en: Multi-Recipient Agreement Indicator + fr: (FR) Multi-Recipient Agreement Indicator + description: + en: | + Use this field to identify whether the funding agreement involves more than one recipient. + • Select "Yes" if the agreement is established with multiple recipients, such as a consortium, partnership, or joint initiative involving two or more organizations. + • Select "No" if the agreement is with a single recipient only. + This field is NOT meant to capture ultimate recipients, but rather instances of multiple recipients directly on a grant or contribution agreement with a federal organization. + fr: | + (FR) + Use this field to identify whether the funding agreement involves more than one recipient. + • Select "Yes" if the agreement is established with multiple recipients, such as a consortium, partnership, or joint initiative involving two or more organizations. + • Select "No" if the agreement is with a single recipient only. + This field is NOT meant to capture ultimate recipients, but rather instances of multiple recipients directly on a grant or contribution agreement with a federal organization. + obligation: + en: Mandatory + fr: Obligatoire + occurrence: Single + excel_required: true + form_required: true + format_type: + en: Controlled List + fr: Liste contrôlée + validation: + en: This field must not be empty. + fr: Ce champ ne doit pas être vide. + datastore_type: text + excel_full_text_choices: true + choice_order_expression: 'value.get("order", False), code' + choices: + Y: + en: Yes + fr: Oui + order: 1 + N: + en: No + fr: Non + order: 2 + + # 3.45 Project Location Variance Indicator + - datastore_id: project_location_variance_indicator + label: + en: Project Location Variance Indicator + fr: (FR) Project Location Variance Indicator + description: + en: | + Use this field to identify whether the location of the project(s) funded under this funding agreement is different from the recipient’s organizational location. + • Select "Yes" if the project activities are primarily carried out in a location that differs from the recipient’s registered or operational address (e.g., a national organization delivering services in a remote community). + • Select "No" if the project activities take place at the same location as the recipient’s registered or operational address. + • Select "Not Applicable" if the project activities do not have a physical address, e.g. research. • Select "Unknown" if the project location is not specified or not known at the time of data entry. + Note: This indicator helps identify agreements where project delivery occurs in regions distinct from the recipient’s base, supporting regional analysis and service coverage assessments. + fr: | + (FR) + Use this field to identify whether the location of the project(s) funded under this funding agreement is different from the recipient’s organizational location. + • Select "Yes" if the project activities are primarily carried out in a location that differs from the recipient’s registered or operational address (e.g., a national organization delivering services in a remote community). + • Select "No" if the project activities take place at the same location as the recipient’s registered or operational address. + • Select "Not Applicable" if the project activities do not have a physical address, e.g. research. • Select "Unknown" if the project location is not specified or not known at the time of data entry. + • Select "Unknown" if the project location is not specified or not known at the time of data entry. + Note: This indicator helps identify agreements where project delivery occurs in regions distinct from the recipient’s base, supporting regional analysis and service coverage assessments. + For domestic projects, please determine your response by comparing the recipient’s city and the project location city. + For international projects, please determine your response by comparing the recipient’s country and the project location country. + obligation: + en: Mandatory + fr: Obligatoire + occurrence: Single + excel_required: true + form_required: true + format_type: + en: Controlled List + fr: Liste contrôlée + validation: + en: This field must not be empty. + fr: Ce champ ne doit pas être vide. + datastore_type: text + excel_full_text_choices: true + choice_order_expression: 'value.get("order", False), code' + choices: + Y: + en: Yes + fr: Oui + order: 1 + N: + en: No + fr: Non + order: 2 + NA: + en: Not applicable + fr: Sans objet + order: 3 + U: + en: Unknown + fr: Inconnue + order: 4 + # System fields for audit trail - datastore_id: record_created label: Record Creation Time From d824b49e2fb6d2abeff08f152bf41443a03aa175 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Mon, 3 Nov 2025 14:35:06 -0500 Subject: [PATCH 26/36] add translations for grantsmonthly phase 2 --- ckanext/canada/tables/grantsmonthly.yaml | 186 ++++++++++++++++------- 1 file changed, 127 insertions(+), 59 deletions(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index 930711463..93fc7b7ff 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -143,7 +143,8 @@ resources: format_type: en: Controlled List fr: Liste contrôlée - excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' datastore_type: text + excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' + datastore_type: text choices: F: en: For-profit organizations @@ -219,9 +220,7 @@ resources: NOT(ISNUMBER(VALUE({cell}))), LEN(TRIM({cell}))<>9, MID(TRIM({cell}),1,1)="0", - LEN({cell})-LEN(SUBSTITUTE({cell},"-",""))>0, - LEN({cell})-LEN(SUBSTITUTE({cell},".",""))>0, - LEN({cell})-LEN(SUBSTITUTE({cell},",",""))>0 + LEN({cell})-LEN(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE({cell},",",""),".",""),"-",""))>0 ) ) ) @@ -1271,21 +1270,20 @@ resources: - datastore_id: recipient_risk_flag_crown label: en: Recipient Risk Flag – Money currently owed to Crown - fr: (FR) Recipient Risk Flag – Money currently owed to Crown + fr: Indicateur de risques liés aux organisations bénéficiaires description: en: | - Use this field to assess whether the recipient has any history or currently instances of owing money to the Crown (to your department) related to this funding agreement, or on other funding agreements in your organizations (based on your department’s history with this recipient). - • Select "Yes" if the recipient has previously owned or currently owes money to the Crown (e.g., outstanding debt to your department or other federal entities) related to any funding agreements. - • Select "No" if the recipient has no known history of owing money to the Crown and there are no current outstanding debts. - • Select "NA – Not Applicable" if this is a newly signed funding agreement with a first-time recipient.. - • Select “Unknown” if you do not have this information (i.e. you do not track this information, or it was unavailable for reporting at this time). - fr: | - (FR) Use this field to assess whether the recipient has any history or currently instances of owingowes money to the Crown (to your department) related to this funding agreement, or on other funding agreements in your organizations (based on your department’s history with this recipient). • Select "Yes" if the recipient has previously owned or currently owes money to the Crown (e.g., outstanding debt to your department or other federal entities) related to any funding agreements. • Select "No" if the recipient has no known history of owing money to the Crown and there are no current outstanding debts. • Select "NA – Not Applicable" if this is a newly signed funding agreement with a first-time recipient.. • Select “Unknown” if you do not have this information (i.e. you do not track this information, or it was unavailable for reporting at this time). + fr: | + Utilisez ce champ pour évaluer si la personne bénéficiaire a des antécédents ou des dettes en cours envers l’État (au sein de votre ministère) liés à cette entente de financement ou à d’autres ententes de financement dans vos organisations, selon les dossiers de votre ministère concernant cette personne. + • Sélectionner « Oui » si l’organisation bénéficiaire a déjà eu ou a actuellement des sommes dues à l’État (p. ex. une dette impayée envers votre ministère ou d’autres entités fédérales) liées à une ou plusieurs ententes de financement. + • Sélectionner « Non » si l’organisation bénéficiaire n’a aucun antécédent connu de sommes dues à l’État et qu’aucune dette impayée n’est actuellement en cours. + • Sélectionner « S. O. — Sans objet » s’il s’agit d’une nouvelle entente de financement conclue avec une organisation bénéficiaire pour la première fois. + • Sélectionner « Inconnu » si vous ne disposez pas de ce renseignement (c’est-à-dire si vous ne le suivez pas ou s’il n’était pas disponible au moment de la déclaration). obligation: en: Mandatory fr: Obligatoire @@ -1323,7 +1321,7 @@ resources: - datastore_id: recipient_risk_flag_compliance label: en: Recipient Risk Flag – Agreement compliance issue - fr: (FR) Recipient Risk Flag – Agreement compliance issue + fr: Indicateur de risques liés à l’organisation bénéficiaire description: en: | Use this field to assess whether there are ongoing or historical compliance issues associated with the recipient of this funding agreement (e.g. improper use of funds, unauthorized change of scope). @@ -1332,12 +1330,11 @@ resources: • Select "N/A – Not Applicable" if this is a newly signed funding agreement with a first-time recipient. • Select “Unknown” if you do not have this information (i.e. you do not track this information, or it was unavailable for reporting at this time). fr: | - (FR) - Use this field to assess whether there are ongoing or historical compliance issues associated with the recipient of this funding agreement (e.g. improper use of funds, unauthorized change of scope). - • Select "Yes" if the recipient has a history of non-compliance with previous funding agreements, or if compliance issues have been identified during the current funding agreement. - • Select "No" if the recipient has remained compliant under the current funding agreement and there are no known compliance issues from past agreements. - • Select "N/A – Not Applicable" if this is a newly signed funding agreement with a first-time recipient. - • Select “Unknown” if you do not have this information (i.e. you do not track this information, or it was unavailable for reporting at this time). + Utilisez ce champ pour évaluer l’existence de problèmes de conformité actuels ou passés liés à la personne bénéficiaire de cette entente de financement (par exemple utilisation inappropriée des fonds ou modification non autorisée de la portée). + • Sélectionner « Oui » si l’organisation bénéficiaire a des antécédents de non-conformité à des ententes de financement antérieures ou si des problèmes de conformité ont été relevés dans le cadre de l’entente de financement actuelle. + • Sélectionner « Non » si l’organisation bénéficiaire est demeurée conforme à l’entente de financement actuelle et qu’aucun problème de conformité n’est connu pour les ententes passées. + • Sélectionner « S. O. — Sans objet » s’il s’agit d’une nouvelle entente de financement conclue avec une organisation bénéficiaire pour la première fois. + • Sélectionner « Inconnu » si vous ne disposez pas de ce renseignement (c’est-à-dire si vous ne le suivez pas ou si elle n’était pas disponible au moment de la déclaration). — Indicateur de risque lié à l’organisation bénéficiaire. obligation: en: Mandatory fr: Obligatoire @@ -1375,7 +1372,7 @@ resources: - datastore_id: recipient_risk_flag_agreement label: en: Recipient Risk Flag – Agreement Close-out issues - fr: (FR) Recipient Risk Flag – Agreement Close-out issues + fr: Problèmes liés à la clôture de l’entente description: en: | Use this field to assess whether the recipient has experienced any issues during the close-out phase of previous or current funding agreements. @@ -1384,12 +1381,11 @@ resources: • Select "N/A – Not Applicable" if this is a newly signed agreement with a first-time recipient, or if the funding agreement is still active and has not yet reached the close-out phase. • Select “Unknown” if you do not have this information (i.e. you do not track this information, or it was unavailable for reporting at this time). fr: | - (FR) - Use this field to assess whether the recipient has experienced any issues during the close-out phase of previous or current funding agreements. - • Select "Yes" if the recipient has a history of close-out issues with previous funding agreements (e.g., delays in final reporting, unresolved deliverables, financial reconciliation problems), or if such issues have been identified during the close-out of the current agreement. - • Select "No" if the recipient has successfully completed close-out requirements for previous and/or current funding agreements without any known issues. - • Select "N/A – Not Applicable" if this is a newly signed agreement with a first-time recipient, or if the funding agreement is still active and has not yet reached the close-out phase. - • Select “Unknown” if you do not have this information (i.e. you do not track this information, or it was unavailable for reporting at this time). + Utiliser ce champ pour évaluer si l’organisation bénéficiaire a rencontré des problèmes lors de la phase de clôture d’ententes de financement antérieures ou en cours. + • Sélectionner « Oui » si l’organisation bénéficiaire a des antécédents de problèmes lors de la clôture d’ententes de financement précédentes (p. ex., retards dans la remise des rapports finaux, livrables non réglés, problèmes liés à l'apurement des comptes) ou si de tels problèmes ont été relevés lors de la clôture de l’entente actuelle. + • Sélectionner « Non » si l’organisation bénéficiaire a satisfait avec succès aux exigences de clôture des ententes de financement précédentes ou en cours, sans qu’aucun problème connu n’ait été relevé. + • Sélectionner « S. O. — Sans objet » s’il s’agit d’une entente nouvellement signée avec une organisation bénéficiaire pour la première fois, ou si l’entente de financement est toujours active et n’a pas encore atteint la phase de clôture. + • Sélectionner « Inconnu » si vous ne disposez pas de ce renseignement (c’est-à-dire si vous ne le suivez pas ou s’il n’était pas disponible au moment de compte rendu). obligation: en: Mandatory fr: Obligatoire @@ -1424,10 +1420,10 @@ resources: order: 4 # 3.42 Contact Information for Funding Agreement - - datastore_id: recipient_risk_flag_agreement + - datastore_id: contact_funding_agreement label: en: Contact Information for Funding Agreement - fr: (FR) Contact Information for Funding Agreement + fr: Coordonnées pour les questions liées à l’entente de financement description: en: | Provide the primary email address for inquiries related to this funding agreement. This contact will be used to facilitate communication between departments and agencies (e.g. clarify agreement scope, coordinate on common recipients, or address operational questions, etc.). @@ -1437,13 +1433,11 @@ resources: • The work email address of the program officer responsible for this agreement Ensure the selected contact is actively monitored and appropriate for interdepartmental correspondence. fr: | - (FR) - Provide the primary email address for inquiries related to this funding agreement. This contact will be used to facilitate communication between departments and agencies (e.g. clarify agreement scope, coordinate on common recipients, or address operational questions, etc.). - You may choose to provide one of the following, based on your program’s communication practices: - • A generic program inbox - • The work email address of the program manager - • The work email address of the program officer responsible for this agreement - Ensure the selected contact is actively monitored and appropriate for interdepartmental correspondence. + Fournir l’adresse courriel principale à laquelle envoyer les demandes de renseignements concernant cette entente de financement. Ce contact servira à faciliter la communication entre les ministères et les organismes (p. ex., clarifier la portée de l’entente, coordonner les actions concernant des bénéficiaires communs ou répondre à des questions opérationnelles, etc.). + Vous pouvez choisir de fournir l’une des options suivantes, selon les pratiques de communication de votre programme : + • Une boîte de réception générique du programme + • L’adresse courriel professionnelle de la personne chargée de la gestion du programme + • L’adresse courriel professionnelle de l’agent ou de l’agente de programme responsable de cette entente obligation: en: Mandatory fr: Obligatoire @@ -1463,17 +1457,16 @@ resources: - datastore_id: multi_funding_indicator label: en: Multi-Program Funding Indicator - fr: (FR) Multi-Program Funding Indicator + fr: Indicateur de financement multiprogrammes description: en: | Use this field to identify whether the funding agreement includes financial contributions from more than one grant and contribution program. • Select "Yes" if the agreement consolidates funding from multiple grant and contribution programs, either within the same department or across different departments or agencies. • Select "No" if the agreement is funded by a single grant and contribution program only. fr: | - (FR) - Use this field to identify whether the funding agreement includes financial contributions from more than one grant and contribution program. - • Select "Yes" if the agreement consolidates funding from multiple grant and contribution programs, either within the same department or across different departments or agencies. - • Select "No" if the agreement is funded by a single grant and contribution program only. + Utiliser ce champ pour indiquer si l’entente de financement comprend des contributions financières provenant de plus d’un programme de subventions et de contributions. + • Sélectionner « Oui » si l’entente regroupe des fonds provenant de plusieurs programmes de subventions et de contributions, que ce soit au sein du même ministère ou entre différents ministères ou organismes. + • Sélectionnez « Non » si l’entente est financée uniquement par un seul programme de subventions et de contributions. obligation: en: Mandatory fr: Obligatoire @@ -1503,7 +1496,7 @@ resources: - datastore_id: multi_recipient_agreement_indicator label: en: Multi-Recipient Agreement Indicator - fr: (FR) Multi-Recipient Agreement Indicator + fr: Indicateur d’entente à bénéficiaires multiples description: en: | Use this field to identify whether the funding agreement involves more than one recipient. @@ -1511,11 +1504,10 @@ resources: • Select "No" if the agreement is with a single recipient only. This field is NOT meant to capture ultimate recipients, but rather instances of multiple recipients directly on a grant or contribution agreement with a federal organization. fr: | - (FR) - Use this field to identify whether the funding agreement involves more than one recipient. - • Select "Yes" if the agreement is established with multiple recipients, such as a consortium, partnership, or joint initiative involving two or more organizations. - • Select "No" if the agreement is with a single recipient only. - This field is NOT meant to capture ultimate recipients, but rather instances of multiple recipients directly on a grant or contribution agreement with a federal organization. + Utiliser ce champ pour indiquer si l’entente de financement implique plus d’une organisation bénéficiaire. + • Sélectionner « Oui » si l’entente est établie avec plusieurs bénéficiaires, par exemple un consortium, un partenariat ou une initiative conjointe impliquant deux organisations ou plus. + • Sélectionner « Non » si l’entente ne concerne qu’une seule organisation bénéficiaire. + Ce champ n’est pas destiné à enregistrer les bénéficiaires finaux, mais plutôt les cas de bénéficiaires multiples directement liés à une entente de subvention ou de contribution avec une organisation fédérale. obligation: en: Mandatory fr: Obligatoire @@ -1545,24 +1537,28 @@ resources: - datastore_id: project_location_variance_indicator label: en: Project Location Variance Indicator - fr: (FR) Project Location Variance Indicator + fr: Indicateur de variation du lieu de projet description: en: | Use this field to identify whether the location of the project(s) funded under this funding agreement is different from the recipient’s organizational location. • Select "Yes" if the project activities are primarily carried out in a location that differs from the recipient’s registered or operational address (e.g., a national organization delivering services in a remote community). • Select "No" if the project activities take place at the same location as the recipient’s registered or operational address. - • Select "Not Applicable" if the project activities do not have a physical address, e.g. research. • Select "Unknown" if the project location is not specified or not known at the time of data entry. - Note: This indicator helps identify agreements where project delivery occurs in regions distinct from the recipient’s base, supporting regional analysis and service coverage assessments. - fr: | - (FR) - Use this field to identify whether the location of the project(s) funded under this funding agreement is different from the recipient’s organizational location. - • Select "Yes" if the project activities are primarily carried out in a location that differs from the recipient’s registered or operational address (e.g., a national organization delivering services in a remote community). - • Select "No" if the project activities take place at the same location as the recipient’s registered or operational address. - • Select "Not Applicable" if the project activities do not have a physical address, e.g. research. • Select "Unknown" if the project location is not specified or not known at the time of data entry. + • Select "Not Applicable" if the project activities do not have a physical address, e.g. research. • Select "Unknown" if the project location is not specified or not known at the time of data entry. Note: This indicator helps identify agreements where project delivery occurs in regions distinct from the recipient’s base, supporting regional analysis and service coverage assessments. + For domestic projects, please determine your response by comparing the recipient’s city and the project location city. For international projects, please determine your response by comparing the recipient’s country and the project location country. + fr: | + Utiliser ce champ pour indiquer si le lieu du ou des projets financés dans le cadre de cette entente de financement diffère de l’emplacement organisationnel de l’organisation bénéficiaire. + • Sélectionner « Oui » si les activités du projet sont principalement réalisées dans un lieu différent de l’adresse enregistrée ou opérationnelle de l’organisation bénéficiaire (p. ex., une organisation nationale offrant des services dans une collectivité éloignée). + • Sélectionner « Non » si les activités du projet se déroulent au même endroit que l’adresse enregistrée ou opérationnelle de l’organisation bénéficiaire. + • Sélectionnez « Sans objet » si les activités du projet n’ont pas d’adresse physique, par exemple dans le cadre de la recherche. + • Sélectionner « Inconnu » si le lieu du projet n’est pas spécifié ou n’est pas connu au moment de la saisie des données. + Remarque : Cet indicateur permet d’indiquer les ententes pour lesquelles la prestation du projet se déroule dans des régions distinctes du siège de l’organisation bénéficiaire, ce qui facilite les analyses régionales et l’évaluation de la couverture des services. + + Pour les projets nationaux, déterminez votre réponse en comparant la ville de la personne bénéficiaire avec celle de l’emplacement du projet. + Pour les projets internationaux, déterminez votre réponse en comparant le pays de la personne bénéficiaire avec celui de l’emplacement du projet. obligation: en: Mandatory fr: Obligatoire @@ -1650,7 +1646,6 @@ resources: errors := errors || required_error(NEW.agreement_value, 'agreement_value'); - errors := errors || required_error(NEW.dem_intended_beneficiary, 'dem_intended_beneficiary'); crval := choices_clean_error(NEW.dem_intended_beneficiary, {dem_intended_beneficiary}, 'dem_intended_beneficiary'); errors := errors || crval.error; NEW.dem_intended_beneficiary := crval.clean; @@ -1660,7 +1655,6 @@ resources: ELSE errors := errors || both_languages_error(NEW.other_dem_intended_beneficiary_description_en, 'other_dem_intended_beneficiary_description_en', NEW.other_dem_intended_beneficiary_description_fr, 'other_dem_intended_beneficiary_description_fr'); END IF; - errors := errors || required_error(NEW.reason_amendment, 'reason_amendment'); crval := choices_clean_error(NEW.reason_amendment, {reason_amendment}, 'reason_amendment'); errors := errors || crval.error; NEW.reason_amendment := crval.clean; @@ -1670,8 +1664,26 @@ resources: ELSE errors := errors || both_languages_error(NEW.other_reason_amendment_en, 'other_reason_amendment_en', NEW.other_reason_amendment_fr, 'other_reason_amendment_fr'); END IF; - errors := errors || required_error(NEW.rating_risk, 'rating_risk'); - errors := errors || choice_error(NEW.rating_risk, {rating_risk}, 'rating_risk'); + + errors := errors || required_error(NEW.recipient_risk_flag_crown, 'recipient_risk_flag_crown'); + errors := errors || choice_error(NEW.recipient_risk_flag_crown, {recipient_risk_flag_crown}, 'recipient_risk_flag_crown'); + + errors := errors || required_error(NEW.recipient_risk_flag_compliance, 'recipient_risk_flag_compliance'); + errors := errors || choice_error(NEW.recipient_risk_flag_compliance, {recipient_risk_flag_compliance}, 'recipient_risk_flag_compliance'); + + errors := errors || required_error(NEW.recipient_risk_flag_agreement, 'recipient_risk_flag_agreement'); + errors := errors || choice_error(NEW.recipient_risk_flag_agreement, {recipient_risk_flag_agreement}, 'recipient_risk_flag_agreement'); + + errors := errors || required_error(NEW.contact_funding_agreement, 'contact_funding_agreement'); + + errors := errors || required_error(NEW.multi_funding_indicator, 'multi_funding_indicator'); + errors := errors || choice_error(NEW.multi_funding_indicator, {multi_funding_indicator}, 'multi_funding_indicator'); + + errors := errors || required_error(NEW.multi_recipient_agreement_indicator, 'multi_recipient_agreement_indicator'); + errors := errors || choice_error(NEW.multi_recipient_agreement_indicator, {multi_recipient_agreement_indicator}, 'multi_recipient_agreement_indicator'); + + errors := errors || required_error(NEW.project_location_variance_indicator, 'project_location_variance_indicator'); + errors := errors || choice_error(NEW.project_location_variance_indicator, {project_location_variance_indicator}, 'project_location_variance_indicator'); errors := errors || required_error(NEW.agreement_start_date, 'agreement_start_date'); IF NEW.agreement_start_date >= '2018-04-01'::date THEN @@ -1691,8 +1703,54 @@ resources: errors := errors || required_error(NEW.description_en, 'description_en'); errors := errors || required_error(NEW.description_fr, 'description_fr'); END IF; + NEW.agreement_value := round(NEW.agreement_value, 2); + IF NEW.agreement_start_date >= '2025-11-01'::date THEN + errors := errors || conditional_required_error(NEW.recipient_type, 'recipient_type'); + + errors := errors || conditional_required_error(NEW.prog_name_en, 'prog_name_en'); + errors := errors || conditional_required_error(NEW.prog_name_fr, 'prog_name_fr'); + + errors := errors || conditional_required_error(NEW.prog_purpose_en, 'prog_purpose_en'); + errors := errors || conditional_required_error(NEW.prog_purpose_fr, 'prog_purpose_fr'); + + errors := errors || conditional_required_error(NEW.agreement_title_en, 'agreement_title_en'); + errors := errors || conditional_required_error(NEW.agreement_title_fr, 'agreement_title_fr'); + + errors := errors || future_date_error(NEW.agreement_start_date, 'agreement_start_date'); + + errors := errors || conditional_required_error(NEW.agreement_end_date, 'agreement_end_date'); + IF NEW.agreement_start_date::timestamp > NEW.agreement_end_date::timestamp THEN + errors := errors || ARRAY[['agreement_start_date', {start_end_date_error}]]; + END IF; + + errors := errors || conditional_required_error(NEW.expected_results_en, 'expected_results_en'); + errors := errors || conditional_required_error(NEW.expected_results_fr, 'expected_results_fr'); + + NEW.recipient_postal_code := trim_lead_trailing(NEW.recipient_postal_code); + NEW.recipient_postal_code := UPPER(NEW.recipient_postal_code); + NEW.recipient_postal_code := REGEXP_REPLACE(NEW.recipient_postal_code, '\s+', ' ', 'g'); + IF NEW.recipient_postal_code IS NOT NULL AND NEW.recipient_postal_code <> '' AND NOT NEW.recipient_postal_code ~ '^[A-Z]\d[A-Z]\s\d[A-Z]\d$' THEN + errors := errors || ARRAY[['recipient_postal_code', {recipient_postal_code_error}]]; + END IF; + + NEW.recipient_business_number := trim_lead_trailing(NEW.recipient_business_number); + IF NEW.recipient_business_number IS NOT NULL AND NEW.recipient_business_number <> '' AND (NOT is_natural_number(NEW.recipient_business_number) OR (is_natural_number(NEW.recipient_business_number) AND LENGTH(NEW.recipient_business_number) != 9)) THEN + errors := errors || ARRAY[['recipient_business_number', {recipient_business_number_error}]]; + END IF; + + NEW.federal_riding_number := trim_lead_trailing(NEW.federal_riding_number); + IF NEW.federal_riding_number IS NOT NULL AND NEW.federal_riding_number <> '' AND (NOT is_natural_number(NEW.federal_riding_number) OR (is_natural_number(NEW.federal_riding_number) AND LENGTH(NEW.federal_riding_number) != 5)) THEN + errors := errors || ARRAY[['federal_riding_number', {federal_riding_number_error}]]; + END IF; + + IF NOT NEW.agreement_value > 0 THEN + errors := errors || ARRAY[['agreement_value', {agreement_value_error}]]; + END IF; + + END IF; + IF errors = '{{}}' THEN RETURN NEW; END IF; @@ -1727,12 +1785,15 @@ resources: prog_name_fr: "Le programme de subvention du Canada" prog_purpose_en: "The Canada Granting Program encourage Canadians to learn about Canada’s geography, history, and economy. The Program provides networking opportunities to enhance recipients’ understanding of Canada." prog_purpose_fr: "Le programme de subventions du Canada incite les Canadiens à se renseigner sur la géographie, l’histoire et l’économie du Canada. Le programme offre des opportunités de réseautage pour aider les bénéficiaires d’améliorer leur compréhension du Canada." + agreement_title_en: "Building better buildings" + agreement_title_fr: "Construire des meilleurs bâtiments" agreement_number: "F1580-140737" agreement_value: "500000" agreement_start_date: "2019-04-01" agreement_end_date: "2020-04-30" description_en: "Developing models and other tools to predict the safety performance of buildings." description_fr: "Met au point des modèles et d'autres outils pour prévoir la sécurité des bâtiments." + naics_identifier: "611710" expected_results_en: "Develop highly qualified personnel available to pursue various careers within industry, academia, government and other sectors of the economy." expected_results_fr: "Développé un personnel hautement qualifié prêt à mener une carrière variée au sein de l’industrie, du milieu académique, de la fonction publique ou dans d’autres secteurs de l’économie." dem_intended_beneficiary: ["Y"] @@ -1742,6 +1803,13 @@ resources: other_reason_amendment_en: Change of the eligible activities or initiatives other_reason_amendment_fr: Modification des activités ou initiatives éligibles rating_risk: "L" + recipient_risk_flag_crown: "Y" + recipient_risk_flag_compliance: "Y" + recipient_risk_flag_agreement: "Y" + contact_funding_agreement: "firstname.lastname@tbs-sct.gc.ca" + multi_funding_indicator: "Y" + multi_recipient_agreement_indicator: "Y" + project_location_variance_indicator: "Y" filters: recipient_province: "ON" From 35ce57af4e07ea1e6af741409bce3b658e2301f2 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Mon, 3 Nov 2025 14:45:04 -0500 Subject: [PATCH 27/36] add trigger string for grants montthly pilot phase 2 --- ckanext/canada/tables/grantsmonthly.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index 93fc7b7ff..ac7e6a025 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -1765,6 +1765,8 @@ resources: invalid_choice_error: 'Invalid choice: {}' conditional_required_error: This field is required due to a response in a different field. both_lang_error: This text must be provided in both languages + start_end_date_error: '"Agreement Start Date" cannot be after "Projected Agreement End Date"' + agreement_value_error: Must be greater than zero examples: record: From 97871f0e02a59762aace2ea939033c0dbfb7cfcc Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Mon, 3 Nov 2025 14:52:33 -0500 Subject: [PATCH 28/36] add more trigger string for grants montthly pilot phase 2 --- ckanext/canada/tables/grantsmonthly.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index ac7e6a025..3f4d11f71 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -1765,6 +1765,9 @@ resources: invalid_choice_error: 'Invalid choice: {}' conditional_required_error: This field is required due to a response in a different field. both_lang_error: This text must be provided in both languages + recipient_postal_code_error: 'Must be a valid Canadian postal code in the format of "A1A 1A1"' + recipient_business_number_error: Must be a 9 digit number + federal_riding_number_error: Must be a 5 digit number start_end_date_error: '"Agreement Start Date" cannot be after "Projected Agreement End Date"' agreement_value_error: Must be greater than zero From 91403aeac6ac7f3a7f810a74e7efe878f6de161f Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Tue, 4 Nov 2025 09:13:37 -0500 Subject: [PATCH 29/36] remove validation from grants monthly pilot phase 1 fields --- ckanext/canada/tables/grantsmonthly.yaml | 52 ++++++++++-------------- 1 file changed, 21 insertions(+), 31 deletions(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index 3f4d11f71..826bf1a99 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -959,9 +959,6 @@ resources: format_type: en: Controlled List fr: Liste contrôlée - validation: - en: This field must not be empty. - fr: Ce champ ne doit pas être vide. datastore_type: _text form_snippet: scheming/form_snippets/multiple_select.html choice_order_expression: 'value.get("order", False), code' @@ -1100,9 +1097,6 @@ resources: format_type: en: Controlled List fr: Liste contrôlée - validation: - en: This field must not be empty. - fr: Ce champ ne doit pas être vide. datastore_type: _text excel_full_text_choices: true form_snippet: scheming/form_snippets/multiple_select.html @@ -1238,9 +1232,6 @@ resources: format_type: en: Controlled List fr: Liste contrôlée - validation: - en: This field must not be empty. - fr: Ce champ ne doit pas être vide. datastore_type: text excel_full_text_choices: true choice_order_expression: 'value.get("order", False), code' @@ -1273,7 +1264,7 @@ resources: fr: Indicateur de risques liés aux organisations bénéficiaires description: en: | - Use this field to assess whether the recipient has any history or currently instances of owingowes money to the Crown (to your department) related to this funding agreement, or on other funding agreements in your organizations (based on your department’s history with this recipient). + Use this field to assess whether the recipient currently owes money to the Crown (to your department) related to this funding agreement, or on other funding agreements in your organization. • Select "Yes" if the recipient has previously owned or currently owes money to the Crown (e.g., outstanding debt to your department or other federal entities) related to any funding agreements. • Select "No" if the recipient has no known history of owing money to the Crown and there are no current outstanding debts. • Select "NA – Not Applicable" if this is a newly signed funding agreement with a first-time recipient.. @@ -1300,19 +1291,19 @@ resources: excel_full_text_choices: true choice_order_expression: 'value.get("order", False), code' choices: - Y: + 'Y': en: Yes fr: Oui order: 1 - N: + 'N': en: No fr: Non order: 2 - NA: + 'NA': en: Not applicable fr: Sans objet order: 3 - U: + 'U': en: Unknown fr: Inconnue order: 4 @@ -1351,19 +1342,19 @@ resources: excel_full_text_choices: true choice_order_expression: 'value.get("order", False), code' choices: - Y: + 'Y': en: Yes fr: Oui order: 1 - N: + 'N': en: No fr: Non order: 2 - NA: + 'NA': en: Not applicable fr: Sans objet order: 3 - U: + 'U': en: Unknown fr: Inconnue order: 4 @@ -1402,19 +1393,19 @@ resources: excel_full_text_choices: true choice_order_expression: 'value.get("order", False), code' choices: - Y: + 'Y': en: Yes fr: Oui order: 1 - N: + 'N': en: No fr: Non order: 2 - NA: + 'NA': en: Not applicable fr: Sans objet order: 3 - U: + 'U': en: Unknown fr: Inconnue order: 4 @@ -1451,7 +1442,6 @@ resources: en: This field must not be empty. fr: Ce champ ne doit pas être vide. datastore_type: text - excel_full_text_choices: true # 3.43 Recipient Risk Flag – Agreement Close-out issues - datastore_id: multi_funding_indicator @@ -1483,11 +1473,11 @@ resources: excel_full_text_choices: true choice_order_expression: 'value.get("order", False), code' choices: - Y: + 'Y': en: Yes fr: Oui order: 1 - N: + 'N': en: No fr: Non order: 2 @@ -1524,11 +1514,11 @@ resources: excel_full_text_choices: true choice_order_expression: 'value.get("order", False), code' choices: - Y: + 'Y': en: Yes fr: Oui order: 1 - N: + 'N': en: No fr: Non order: 2 @@ -1575,19 +1565,19 @@ resources: excel_full_text_choices: true choice_order_expression: 'value.get("order", False), code' choices: - Y: + 'Y': en: Yes fr: Oui order: 1 - N: + 'N': en: No fr: Non order: 2 - NA: + 'NA': en: Not applicable fr: Sans objet order: 3 - U: + 'U': en: Unknown fr: Inconnue order: 4 From 944e293a388e56ec568722c21c9afedef5b84b29 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Tue, 4 Nov 2025 10:31:53 -0500 Subject: [PATCH 30/36] change required fields from grants monthly pilot phase 1 --- ckanext/canada/tables/grantsmonthly.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index 826bf1a99..93bce0320 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -953,8 +953,8 @@ resources: en: Optional fr: Facultatif occurrence: Repeatable - excel_required: true - form_required: true + excel_required: false + form_required: false excel_full_text_choices: true format_type: en: Controlled List @@ -1092,8 +1092,8 @@ resources: en: Optional fr: Facultatif occurrence: Repeatable - excel_required: true - form_required: true + excel_required: false + form_required: false format_type: en: Controlled List fr: Liste contrôlée @@ -1227,8 +1227,8 @@ resources: en: Optional fr: Facultatif occurrence: Single - excel_required: true - form_required: true + excel_required: false + form_required: false format_type: en: Controlled List fr: Liste contrôlée From a4fe84c39639042f87aa43a6e7f914321568c377 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Tue, 4 Nov 2025 10:56:06 -0500 Subject: [PATCH 31/36] fix Y/N options for grants monthly pilot phase 2 fields --- ckanext/canada/tables/grantsmonthly.yaml | 80 ++++++++++++------------ 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index 93bce0320..a4eb93f25 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -1292,20 +1292,20 @@ resources: choice_order_expression: 'value.get("order", False), code' choices: 'Y': - en: Yes - fr: Oui + en: "Yes" + fr: "Oui" order: 1 'N': - en: No - fr: Non + en: "No" + fr: "Non" order: 2 'NA': - en: Not applicable - fr: Sans objet + en: "Not applicable" + fr: "Sans objet" order: 3 'U': - en: Unknown - fr: Inconnue + en: "Unknown" + fr: "Inconnue" order: 4 # 3.40 Recipient Risk Flag – Agreement compliance issue @@ -1343,20 +1343,20 @@ resources: choice_order_expression: 'value.get("order", False), code' choices: 'Y': - en: Yes - fr: Oui + en: "Yes" + fr: "Oui" order: 1 'N': - en: No - fr: Non + en: "No" + fr: "Non" order: 2 'NA': - en: Not applicable - fr: Sans objet + en: "Not applicable" + fr: "Sans objet" order: 3 'U': - en: Unknown - fr: Inconnue + en: "Unknown" + fr: "Inconnue" order: 4 # 3.41 Recipient Risk Flag – Agreement Close-out issues @@ -1394,20 +1394,20 @@ resources: choice_order_expression: 'value.get("order", False), code' choices: 'Y': - en: Yes - fr: Oui + en: "Yes" + fr: "Oui" order: 1 'N': - en: No - fr: Non + en: "No" + fr: "Non" order: 2 'NA': - en: Not applicable - fr: Sans objet + en: "Not applicable" + fr: "Sans objet" order: 3 'U': - en: Unknown - fr: Inconnue + en: "Unknown" + fr: "Inconnue" order: 4 # 3.42 Contact Information for Funding Agreement @@ -1474,12 +1474,12 @@ resources: choice_order_expression: 'value.get("order", False), code' choices: 'Y': - en: Yes - fr: Oui + en: "Yes" + fr: "Oui" order: 1 'N': - en: No - fr: Non + en: "No" + fr: "Non" order: 2 # 3.44 Multi-Recipient Agreement Indicator @@ -1515,12 +1515,12 @@ resources: choice_order_expression: 'value.get("order", False), code' choices: 'Y': - en: Yes - fr: Oui + en: "Yes" + fr: "Oui" order: 1 'N': - en: No - fr: Non + en: "No" + fr: "Non" order: 2 # 3.45 Project Location Variance Indicator @@ -1566,20 +1566,20 @@ resources: choice_order_expression: 'value.get("order", False), code' choices: 'Y': - en: Yes - fr: Oui + en: "Yes" + fr: "Oui" order: 1 'N': - en: No - fr: Non + en: "No" + fr: "Non" order: 2 'NA': - en: Not applicable - fr: Sans objet + en: "Not applicable" + fr: "Sans objet" order: 3 'U': - en: Unknown - fr: Inconnue + en: "Unknown" + fr: "Inconnue" order: 4 # System fields for audit trail From aeba1b502c6545126c942ac25a7546b557d4314a Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Tue, 18 Nov 2025 11:30:35 -0500 Subject: [PATCH 32/36] update option label for the recipient_type field --- ckanext/canada/tables/grantsmonthly.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index a4eb93f25..319a53bcc 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -156,7 +156,7 @@ resources: en: Academia fr: établissement universitaire et institution publique A: - en: Aboriginal recipients + en: Indigenous recipients fr: bénéficiaire autochtone G: en: Government From f29376103f034db17fb58dfc1b4d83c70ffa3270 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Wed, 19 Nov 2025 12:57:05 -0500 Subject: [PATCH 33/36] change the ref_number field description to show Q instead of M --- ckanext/canada/tables/grantsmonthly.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index 319a53bcc..2fd6cf57b 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -29,23 +29,23 @@ resources: en: | The Reference number is populated by departments. It is a unique reference number given to each entry. Having a unique identifier for each item will allow departments to locate a specific item in the registry should they need to modify or delete. - Controlled format; This field is populated in the following format DDD-YYYY-YYYY-MX-XXXXX + Controlled format; This field is populated in the following format DDD-YYYY-YYYY-QX-XXXXX 1. DDD represents the department number – Use the same three-digit number as the ‘Departmental Identifier’, which is the department number per the Chart of Accounts list of departments. Ensure you are reviewing the most current year: https://www.tpsgc-pwgsc.gc.ca/recgen/pceaf-gwcoa/2425/txt/rg-3-num-eng.html 2. YYYY-YYYY represents the fiscal year - 3. MX represents the fiscal month + 3. QX represents the fiscal quarter 4. XXXXX represents the unique number assigned by the department for each entry. - For example, entries in the 2018-2019 M1 fiscal year should be assigned numbers as follows: 001-2018-2019-M1-00001, 001-2018-2019-M1-00002, 001-2018-2019-M1-00003, etc.' + For example, entries in the 2018-2019 Q1 fiscal year should be assigned numbers as follows: 001-2018-2019-Q1-00001, 001-2018-2019-Q1-00002, 001-2018-2019-Q1-00003, etc.' fr: | Ce champ est rempli par l’utilisateur. L’identificateur de projet ministériel permet aux ministères d’identifier rapidement les rapports produits dans leur propre système. Les ministères devraient utiliser un chiffre qui est logique pour le ministère. Ces renseignements seront publiés dans le cadre du rapport. - Format contrôlé; Ce champ est rempli au format suivant: DDD-YYYY-YYYY-MX-XXXXX - 1. DDD représente le numéro de département - Utilisez le même numéro à trois chiffres que l’«Identificateur ministériel», qui est le numéro de ministère selon la liste du plan comptable des ministères. Assurez-vous de consulter l’année la plus récente : https://www.tpsgc-pwgsc.gc.ca/recgen/pceaf-gwcoa/2425/txt/rg-3-num-fra.html + Format contrôlé; Ce champ est rempli au format suivant: DDD-YYYY-YYYY-QX-XXXXX + 1. DDD représente le numéro du ministère - Utilisez le même numéro à trois chiffres que l’«Identificateur ministériel», qui est le numéro de ministère selon la liste du plan comptable des ministères. Assurez-vous de consulter l’année la plus récente : https://www.tpsgc-pwgsc.gc.ca/recgen/pceaf-gwcoa/2425/txt/rg-3-num-fra.html 2. AAAA-AAAA représente l'année fiscale - 3. MX représente le mois fiscal + 3. QX représente le trimestre fiscal 4. XXXXX représente le numéro unique attribué par le département pour chaque entrée. - Par exemple, les numéros de l'exercice 2018-2019 du T1 devraient recevoir les numéros suivants: 001-2018-2019-M1-00001, 001-2018-2019-M1-00002, 001-2018-2019-M1-00003, etc.' + Par exemple, les numéros de l'exercice 2018-2019 du T1 devraient recevoir les numéros suivants: 001-2018-2019-Q1-00001, 001-2018-2019-Q1-00002, 001-2018-2019-Q1-00003, etc.' obligation: en: Mandatory fr: Obligatoire @@ -1763,7 +1763,7 @@ resources: examples: record: - ref_number: "001-2018-2019-M2-00045" + ref_number: "001-2018-2019-Q2-00045" amendment_number: "3" amendment_date: "2018-04-01" agreement_type: "G" @@ -1809,7 +1809,7 @@ resources: filters: recipient_province: "ON" filter_one: - ref_number: "001-2018-2019-M2-00045" + ref_number: "001-2018-2019-Q2-00045" amendment_number: "0" sort: agreement_date desc From 75c8f79a45607d8c1a58d07e5538fb4666199551 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Tue, 9 Dec 2025 10:54:37 -0500 Subject: [PATCH 34/36] update description for field agreement_start_date --- ckanext/canada/tables/grantsmonthly.yaml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index 2fd6cf57b..0b81676ef 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -675,14 +675,8 @@ resources: en: Agreement Start Date fr: Date de début de l’entente description: - en: | - The agreement start date is the assumed start of the agreement, normally identified based on the last date of signature, as captured in the initial agreement. - - This date should identify the start of the funding agreement, and not the date of the grant or contribution project. - fr: | - La date de début de l'entente est la date d'entrée en vigueur présumée de l'entente, commence généralement à être identifié en fonction de la dernière date de signature, conformément à l'entente initiale. - - Cette date doit indiquer le début de l'accord de financement, et non la date du projet de subvention ou de contribution. + en: The agreement start date is the start of the agreement as identified by the last date of signature in the initial agreement. + fr: La date de début de l’accord correspond au début prévu de l’accord, généralement déterminé en fonction de la dernière date de signature, telle qu’elle figure dans l’accord initial. obligation: en: Mandatory fr: Obligatoire From 6286a35480dcfd85bd988f3eb3ef98a1c3fbbc55 Mon Sep 17 00:00:00 2001 From: Jesse Vickery Date: Mon, 15 Dec 2025 19:57:16 +0000 Subject: [PATCH 35/36] feat(pd): grants pilot; - Added js evals for the Grants Pilot pd type. --- ckanext/canada/tables/grantsmonthly.yaml | 122 ++++++++++++++++++++--- 1 file changed, 108 insertions(+), 14 deletions(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index 0b81676ef..bed2c875f 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -55,6 +55,8 @@ resources: en: Free text fr: Texte libre datastore_type: text + datatables_col_class: col-lg + js_error_eval: 'VALUE.length > 0 && VALUE.includes(",")' # 3.2 Amendment Number - datastore_id: amendment_number @@ -81,6 +83,7 @@ resources: form_required: true format_type: Numeric only datastore_type: int + datatables_col_class: col-sm pd-datatables-primary-key-offset-lg # 3.3 Amendment Date - datastore_id: amendment_date @@ -96,6 +99,7 @@ resources: format_type: Date (Please format the data as YYYY-MM-DD) datastore_type: date excel_cell_required_formula: 'and({column}{row}="",{column_before}{row}<>0)' + js_required_eval: '{{amendment_number}}.length > 0 && {{amendment_number}} != 0' form_snippet: scheming/form_snippets/date.html # 3.4 Agreement Type @@ -144,6 +148,7 @@ resources: en: Controlled List fr: Liste contrôlée excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' + js_required_eval: '{{agreement_start_date}}.length > 0 && new Date({{agreement_start_date}}) >= new Date("2025-12-01")' datastore_type: text choices: F: @@ -224,6 +229,19 @@ resources: ) ) ) + js_error_eval: >- + {{agreement_start_date}}.length > 0 && + new Date({{agreement_start_date}}) >= new Date("2025-12-01") && + VALUE.length > 0 && + ( + ( + String(VALUE).match(/^-?[0-9]+$/) != null + && parseInt(VALUE) < 0 + ) || + VALUE.startsWith("0") || + VALUE.length != 9 || + String(VALUE).match(/^-?[0-9]+$/) == null + ) datastore_type: text # 3.7 Recipient Legal Name @@ -249,6 +267,7 @@ resources: en: Free text fr: Texte libre datastore_type: text + datatables_col_class: col-lg form_attrs: size: 60 @@ -273,6 +292,7 @@ resources: en: Free text fr: Texte libre datastore_type: text + datatables_col_class: col-lg form_attrs: size: 60 @@ -311,6 +331,7 @@ resources: fr: Liste contrôlée datastore_type: text excel_cell_required_formula: 'and({column}{row}="",{column_before}{row}="CA")' + js_required_eval: '{{recipient_country}}.length > 0 && {{recipient_country}} == "CA"' choices: "ON": en: Ontario @@ -431,6 +452,11 @@ resources: ) ) ) + js_error_eval: >- + {{agreement_start_date}}.length > 0 && + new Date({{agreement_start_date}}) >= new Date("2025-12-01") && + VALUE.length > 0 && + ! /^[A-Za-z]\d[A-Za-z] \d[A-Za-z]\d$/.test(VALUE) datastore_type: text # 3.13 Federal Riding Number @@ -468,6 +494,19 @@ resources: ) ) ) + js_error_eval: >- + {{agreement_start_date}}.length > 0 && + new Date({{agreement_start_date}}) >= new Date("2025-12-01") && + VALUE.length > 0 && + ( + ( + String(VALUE).match(/^-?[0-9]+$/) != null + && parseInt(VALUE) < 0 + ) || + VALUE.startsWith("0") || + VALUE.length != 5 || + String(VALUE).match(/^-?[0-9]+$/) == null + ) datastore_type: text # 3.14 Program Name (English) @@ -489,6 +528,8 @@ resources: fr: Texte libre excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' datastore_type: text + datatables_col_class: col-lg + js_required_eval: '{{prog_name_fr}}.length > 0 || ({{agreement_start_date}}.length > 0 && new Date({{agreement_start_date}}) >= new Date("2025-12-01"))' form_attrs: size: 60 @@ -511,6 +552,8 @@ resources: fr: Texte libre excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' datastore_type: text + datatables_col_class: col-lg + js_required_eval: '{{prog_name_en}}.length > 0 || ({{agreement_start_date}}.length > 0 && new Date({{agreement_start_date}}) >= new Date("2025-12-01"))' form_attrs: size: 60 @@ -533,9 +576,11 @@ resources: fr: Texte libre excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' datastore_type: text + datatables_col_class: col-xxl form_snippet: scheming/form_snippets/textarea.html + js_required_eval: '{{prog_purpose_fr}}.length > 0 || ({{agreement_start_date}}.length > 0 && new Date({{agreement_start_date}}) >= new Date("2025-12-01"))' form_attrs: - style: "width: 100%; display: block" + class: form-control canada-width-full d-block # 3.19 Program Purpose (French) - datastore_id: prog_purpose_fr @@ -556,9 +601,11 @@ resources: fr: Texte libre excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' datastore_type: text + datatables_col_class: col-xxl form_snippet: scheming/form_snippets/textarea.html + js_required_eval: '{{prog_purpose_en}}.length > 0 || ({{agreement_start_date}}.length > 0 && new Date({{agreement_start_date}}) >= new Date("2025-12-01"))' form_attrs: - style: "width: 100%; display: block" + class: form-control canada-width-full d-block # 3.20 Agreement Title (English) (formerly proj_name_en) - datastore_id: agreement_title_en @@ -579,6 +626,8 @@ resources: fr: Texte libre excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' datastore_type: text + datatables_col_class: col-lg + js_required_eval: '{{agreement_title_fr}}.length > 0 || ({{agreement_start_date}}.length > 0 && new Date({{agreement_start_date}}) >= new Date("2025-12-01"))' form_attrs: size: 60 @@ -601,6 +650,8 @@ resources: fr: Texte libre excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' datastore_type: text + datatables_col_class: col-lg + js_required_eval: '{{agreement_title_en}}.length > 0 || ({{agreement_start_date}}.length > 0 && new Date({{agreement_start_date}}) >= new Date("2025-12-01"))' form_attrs: size: 60 @@ -662,6 +713,17 @@ resources: ) ) ) + js_error_eval: >- + {{agreement_start_date}}.length > 0 && + new Date({{agreement_start_date}}) >= new Date("2025-12-01") && + VALUE.length > 0 && + ( + ( + String(VALUE).match(/^-?[0-9]+$/) != null + && parseInt(VALUE) < 0 + ) || + String(VALUE).match(/^-?[0-9]+$/) == null + ) solr_dollar_range_facet: - 10000 - 25000 @@ -694,6 +756,15 @@ resources: en: Date (Please format the date as YYYY-MM-DD) fr: "Date (Veuillez utiliser le format de date suivant : AAAA-MM-JJ)" excel_error_formula: 'OR({default_formula},{cell}>TODAY(),AND(NOT(ISBLANK({cell})),NOT(ISBLANK({agreement_end_date})),{cell}>{agreement_end_date}))' + js_error_eval: >- + VALUE.length > 0 && + ( + new Date(VALUE) > new Date() || + ( + {{agreement_end_date}}.length > 0 && + new Date(VALUE) > new Date({{agreement_end_date}}) + ) + ) datastore_type: date extract_date_year: true extract_date_month: true @@ -718,6 +789,11 @@ resources: fr: "Date (Veuillez utiliser le format de date suivant : AAAA-MM-JJ)" excel_error_formula: 'OR({default_formula},AND(NOT(ISBLANK({agreement_start_date})),NOT(ISBLANK({cell})),{cell}<{agreement_start_date}))' excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' + js_required_eval: '{{agreement_start_date}}.length > 0 && new Date({{agreement_start_date}}) >= new Date("2025-12-01")' + js_error_eval: >- + VALUE.length > 0 && + {{agreement_start_date}}.length > 0 && + new Date(VALUE) < new Date({{agreement_start_date}}) datastore_type: date form_snippet: scheming/form_snippets/date.html @@ -739,8 +815,10 @@ resources: fr: Texte libre datastore_type: text form_snippet: scheming/form_snippets/textarea.html + datatables_col_class: col-xl + js_required_eval: '{{description_fr}}.length > 0' form_attrs: - style: "width: 100%; display: block" + class: form-control canada-width-full d-block # 3.27 Description (French) - datastore_id: description_fr @@ -760,8 +838,10 @@ resources: fr: Texte libre datastore_type: text form_snippet: scheming/form_snippets/textarea.html + datatables_col_class: col-xl + js_required_eval: '{{description_en}}.length > 0' form_attrs: - style: "width: 100%; display: block" + class: form-control canada-width-full d-block # 3.28 NAICS Identifier (New Field) - datastore_id: naics_identifier @@ -817,10 +897,12 @@ resources: en: Free text fr: Texte libre excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' + js_required_eval: '{{agreement_start_date}}.length > 0 && new Date({{agreement_start_date}}) >= new Date("2025-12-01")' datastore_type: text + datatables_col_class: col-xxl form_snippet: scheming/form_snippets/textarea.html form_attrs: - style: "width: 100%; display: block" + class: form-control canada-width-full d-block # 3.30 Expected Results or Intended Outcome (French) - datastore_id: expected_results_fr @@ -840,10 +922,12 @@ resources: en: Free text fr: Texte libre excel_required_formula: 'AND(NOT(ISBLANK({agreement_start_date})),VALUE({agreement_start_date})>=DATE(2025,11,1))' + js_required_eval: '{{agreement_start_date}}.length > 0 && new Date({{agreement_start_date}}) >= new Date("2025-12-01")' datastore_type: text + datatables_col_class: col-xxl form_snippet: scheming/form_snippets/textarea.html form_attrs: - style: "width: 100%; display: block" + class: form-control canada-width-full d-block # 3.31 Additional Information (English) (Formerly comments_en, additional_info_en) - datastore_id: additional_information_en @@ -886,6 +970,7 @@ resources: en: Free text fr: Texte libre datastore_type: text + datatables_col_class: col-xxl form_snippet: scheming/form_snippets/textarea.html form_attrs: class: form-control canada-width-full d-block @@ -931,6 +1016,7 @@ resources: en: Free text fr: Texte libre datastore_type: text + datatables_col_class: col-xxl form_snippet: scheming/form_snippets/textarea.html form_attrs: class: form-control canada-width-full d-block @@ -1034,8 +1120,10 @@ resources: datastore_type: text max_chars: 1800 excel_required_formula: 'OR(TRIM(LEFT({dem_intended_beneficiary},FIND(":",{dem_intended_beneficiary}&":")-1))="O",NOT(ISBLANK({other_dem_intended_beneficiary_description_fr})))' + js_required_eval: '{{other_dem_intended_beneficiary_description_fr}}.length > 0 || ({{dem_intended_beneficiary}}.length > 0 && {{dem_intended_beneficiary}}.includes("O"))' + datatables_col_class: col-xxl form_attrs: - style: "width: 100%; display: block" + class: form-control canada-width-full d-block maxlength: 1800 # 3.35 Other Demographic of ultimate beneficiary Description (French) @@ -1070,8 +1158,10 @@ resources: datastore_type: text max_chars: 1800 excel_required_formula: 'OR(TRIM(LEFT({dem_intended_beneficiary},FIND(":",{dem_intended_beneficiary}&":")-1))="O",NOT(ISBLANK({other_dem_intended_beneficiary_description_en})))' + js_required_eval: '{{other_dem_intended_beneficiary_description_en}}.length > 0 || ({{dem_intended_beneficiary}}.length > 0 && {{dem_intended_beneficiary}}.includes("O"))' + datatables_col_class: col-xxl form_attrs: - style: "width: 100%; display: block" + class: form-control canada-width-full d-block maxlength: 1800 # 3.36 Reason for the amendment @@ -1154,8 +1244,10 @@ resources: datastore_type: text max_chars: 1800 excel_required_formula: 'OR(TRIM(LEFT({reason_amendment},FIND(":",{reason_amendment}&":")-1))="O",NOT(ISBLANK({other_reason_amendment_fr})))' + js_required_eval: '{{other_reason_amendment_fr}}.length > 0 || ({{reason_amendment}}.length > 0 && {{reason_amendment}}.includes("O"))' + datatables_col_class: col-xxl form_attrs: - style: "width: 100%; display: block" + class: form-control canada-width-full d-block maxlength: 1800 # 3.38 Reason for amendment Description (French) @@ -1191,8 +1283,10 @@ resources: datastore_type: text max_chars: 1800 excel_required_formula: 'OR(TRIM(LEFT({reason_amendment},FIND(":",{reason_amendment}&":")-1))="O",NOT(ISBLANK({other_reason_amendment_en})))' + js_required_eval: '{{other_reason_amendment_en}}.length > 0 || ({{reason_amendment}}.length > 0 && {{reason_amendment}}.includes("O"))' + datatables_col_class: col-xxl form_attrs: - style: "width: 100%; display: block" + class: form-control canada-width-full d-block maxlength: 1800 # 3.39 Risk rating @@ -1261,7 +1355,7 @@ resources: Use this field to assess whether the recipient currently owes money to the Crown (to your department) related to this funding agreement, or on other funding agreements in your organization. • Select "Yes" if the recipient has previously owned or currently owes money to the Crown (e.g., outstanding debt to your department or other federal entities) related to any funding agreements. • Select "No" if the recipient has no known history of owing money to the Crown and there are no current outstanding debts. - • Select "NA – Not Applicable" if this is a newly signed funding agreement with a first-time recipient.. + • Select "NA – Not Applicable" if this is a newly signed funding agreement with a first-time recipient.. • Select “Unknown” if you do not have this information (i.e. you do not track this information, or it was unavailable for reporting at this time). fr: | Utilisez ce champ pour évaluer si la personne bénéficiaire a des antécédents ou des dettes en cours envers l’État (au sein de votre ministère) liés à cette entente de financement ou à d’autres ententes de financement dans vos organisations, selon les dossiers de votre ministère concernant cette personne. @@ -1360,10 +1454,10 @@ resources: fr: Problèmes liés à la clôture de l’entente description: en: | - Use this field to assess whether the recipient has experienced any issues during the close-out phase of previous or current funding agreements. + Use this field to assess whether the recipient has experienced any issues during the close-out phase of previous or current funding agreements. • Select "Yes" if the recipient has a history of close-out issues with previous funding agreements (e.g., delays in final reporting, unresolved deliverables, financial reconciliation problems), or if such issues have been identified during the close-out of the current agreement. • Select "No" if the recipient has successfully completed close-out requirements for previous and/or current funding agreements without any known issues. - • Select "N/A – Not Applicable" if this is a newly signed agreement with a first-time recipient, or if the funding agreement is still active and has not yet reached the close-out phase. + • Select "N/A – Not Applicable" if this is a newly signed agreement with a first-time recipient, or if the funding agreement is still active and has not yet reached the close-out phase. • Select “Unknown” if you do not have this information (i.e. you do not track this information, or it was unavailable for reporting at this time). fr: | Utiliser ce champ pour évaluer si l’organisation bénéficiaire a rencontré des problèmes lors de la phase de clôture d’ententes de financement antérieures ou en cours. @@ -1444,7 +1538,7 @@ resources: fr: Indicateur de financement multiprogrammes description: en: | - Use this field to identify whether the funding agreement includes financial contributions from more than one grant and contribution program. + Use this field to identify whether the funding agreement includes financial contributions from more than one grant and contribution program. • Select "Yes" if the agreement consolidates funding from multiple grant and contribution programs, either within the same department or across different departments or agencies. • Select "No" if the agreement is funded by a single grant and contribution program only. fr: | From 93267da82a78aa0606547ac0f94588241d96e1b2 Mon Sep 17 00:00:00 2001 From: RabiaSajjad Date: Mon, 5 Jan 2026 14:08:00 -0500 Subject: [PATCH 36/36] update link in description for the naics identifier --- ckanext/canada/tables/grantsmonthly.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ckanext/canada/tables/grantsmonthly.yaml b/ckanext/canada/tables/grantsmonthly.yaml index bed2c875f..0704d0a8f 100644 --- a/ckanext/canada/tables/grantsmonthly.yaml +++ b/ckanext/canada/tables/grantsmonthly.yaml @@ -856,7 +856,7 @@ resources: fr: Facultatif format_type: en: | - Free text based on controlled list from Statistics Canada; This list is available to users on the Statistics Canada website. http://www.statcan.gc.ca/eng/subjects/standard/naics/2012/index + Free text based on controlled list from Statistics Canada; This list is available to users on the Statistics Canada website. https://www.statcan.gc.ca/en/subjects/standard/naics/2022/v1/index The “NAICS identifier” field should be populated with the most appropriate choice in the selection list. Departments should consult the Statistics Canada website and populate at their own discretion. At least 3 digits should be entered to allow for broad coding when specificity is not possible. @@ -867,7 +867,7 @@ resources: • industry group: 7 (educational support services) • industry: 10 (educational support services) fr: | - Texte libre basé sur une liste contrôlée de Statistique Canada; cette liste est disponible pour les utilisateurs sur le site Web de Statistique Canada. https://www.statcan.gc.ca/fr/sujets/norme/scian/2012/index + Texte libre basé sur une liste contrôlée de Statistique Canada; cette liste est disponible pour les utilisateurs sur le site Web de Statistique Canada. https://www.statcan.gc.ca/fr/sujets/norme/scian/2022/v1/index Le champ « Identifiant SCIAN » doit être rempli avec le choix le plus approprié dans la liste de sélection. Les ministères doivent consulter le site Web de Statistique Canada et le remplir à leur guise. Au moins trois chiffres doivent être saisis pour permettre un codage large lorsque la spécificité n’est pas possible.