Skip to content

Commit

Permalink
Merge pull request #2994 from clari182/feature/implicated-systems
Browse files Browse the repository at this point in the history
Feature/implicated systems
  • Loading branch information
clari182 authored Dec 4, 2024
2 parents 8b0e051 + 444cae6 commit cce27d9
Show file tree
Hide file tree
Showing 73 changed files with 4,398 additions and 3,925 deletions.
4 changes: 4 additions & 0 deletions site/gatsby-site/i18n/locales/en/popovers.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
"title": "Quiet",
"text": "Quiet reports are those that will not be published in the 'Latest Reports' section of the homepage. Quiet reports are used for reports that are useful for internal data but do not need to be promoted. If you are unsure, leave this field blank."
},
"implicated_systems": {
"title": "Implicated Systems",
"text": "The AI systems involved in the incident. If multiple, press “enter” to begin a new item."
},
"similarIncidentSearch": {
"title": "Search for similar incidents",
"text": "Search for a similar or dissimilar incident by typing an incident ID. If the resulting incident is similar click 'Yes', if it's dissimilar click 'No'. If you're not sure click 'Not sure'. Once selected, the incident will be added to the 'Manually-selected similar and dissimilar incidents' section of the form. Once added, if you want to remove it, click the 'Not Sure' button."
Expand Down
4 changes: 3 additions & 1 deletion site/gatsby-site/i18n/locales/es/entities.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
"{{count}} Report_plural": "{{count}} Reportes",
"Incidents involved as both Developer and Deployer": "Incidentes involucrados como desarrollador e implementador",
"Incidents Harmed By": "Afectado por Incidentes",
"Alleged: <2></2> developed and deployed an AI system, which harmed <5></5>.": "Presunto: un sistema de IA desarrollado e implementado por <2></2>, perjudicó a <5></5>.",
"Alleged: <2></2> developed and deployed an AI system, which harmed <6></6>.": "Presunto: un sistema de IA desarrollado e implementado por <2></2>, perjudicó a <6></6>.",
"The AI implicated system is": "El sistema de IA implicado es",
"The AI implicated systems are": "Los sistemas de IA implicados son",
"Alleged: <1></1> developed an AI system deployed by <4></4>, which harmed <6></6>.": "Presunto: un sistema de IA desarrollado por <1></1> e implementado por <4></4>, perjudicó a <6></6>.",
"Entities involved in AI Incidents": "^Entities involved in AI Incidents",
"{{count}} Incident responses": "{{count}} respuestas de incidentes",
Expand Down
4 changes: 4 additions & 0 deletions site/gatsby-site/i18n/locales/es/popovers.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
"title": "¿Es un informe silencioso?",
"text": "Los informes silenciosos son aquellos que no se publicarán en la sección 'Últimos informes' de la página de inicio. Los informes silenciosos se utilizan para informes que son útiles para datos internos pero que no necesitan promocionarse. Si no está seguro, deje este campo en blanco."
},
"implicated_systems": {
"title": "Sistemas implicados",
"text": "Los sistemas de IA involucrados en el incidente. Si son múltiples, presione “enter” después del elemento para ingresar uno nuevo."
},
"similarIncidentSearch": {
"title": "Buscar incidentes similares",
"text": "Busque un incidente similar o diferente escribiendo un ID de incidente. Si el incidente resultante es similar, haga clic en 'Sí', si es diferente, haga clic en 'No'. Si no está seguro, haga clic en 'No estoy seguro'. Una vez seleccionado, el incidente se agregará a la sección del formulario 'Incidentes similares y diferentes seleccionados manualmente'. Una vez agregado, si desea eliminarlo, haga clic en el botón “No estoy seguro”."
Expand Down
2 changes: 2 additions & 0 deletions site/gatsby-site/i18n/locales/es/submit.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,7 @@
"Submit a new incident report to the Artificial Intelligence Incident Database": "Enviar un nuevo informe de incidente a la Base de Datos de Incidentes de Inteligencia Artificial",
"Draft saved": "Borrador guardado",
"Saving as draft...": "Guardando como borrador...",
"Implicated Systems": "Sistemas Implicados",
"What systems were involved in the incident?": "¿Qué sistemas estuvieron involucrados en el incidente?",
"Please confirm you are ready to submit this report. Report details cannot be changed after submission.": "Por favor confirma que estás listo para enviar este informe. Los detalles del informe no se pueden cambiar después de la presentación."
}
1 change: 1 addition & 0 deletions site/gatsby-site/i18n/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@
"Redirecting...": "Redirigiendo",
"Random Incident": "Incidente aleatorio",
"Risk Checklists": "Control de Riesgos",
"Implicated Systems": "Sistemas Implicados",
"Manually-selected similar and dissimilar incidents": "Incidentes similares y disímiles seleccionados manualmente",
"Search similar/dissimilar Incident Id": "Buscar incidente similar/disímil por ID",
"Assigned similar/dissimilar incidents": "Incidentes similares/disímiles asignados",
Expand Down
4 changes: 3 additions & 1 deletion site/gatsby-site/i18n/locales/es/validation.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,7 @@
"*Description is required": "*La descripción es obligatoria",
"*Incident Date is required": "*Fecha del incidente es obligatoria",
"*Incident Date required": "*Fecha del incidente es obligatoria",
"*Incident ID(s) must be a number": "*El ID del incidente debe ser un número"
"*Incident ID(s) must be a number": "*El ID del incidente debe ser un número",
"Implicated Systems must have at least 3 characters": "Los sistemas implicados deben tener al menos 3 caracteres",
"Implicated Systems can't be longer than 200 characters": "Los sistemas implicados no pueden tener más de 200 caracteres"
}
4 changes: 3 additions & 1 deletion site/gatsby-site/i18n/locales/fr/entities.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@
"Editing Entity": "Modification de l'entité",
"Back to Entity: {{name}}": "Retour à l'entité: {{name}}",
"Entity updated successfully.": "Entité mise à jour avec succès.",
"Error updating Entity.": "Erreur lors de la mise à jour de l'entité."
"Error updating Entity.": "Erreur lors de la mise à jour de l'entité.",
"The AI implicated system is": "Le système d'IA impliqué est",
"The AI implicated systems are": "Les systèmes d'IA impliqués sont"
}
4 changes: 4 additions & 0 deletions site/gatsby-site/i18n/locales/fr/popovers.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
"title": "Est-ce un rapport silencieux ?",
"text": "Les rapports silencieux sont ceux qui ne seront pas publiés dans la section « Derniers rapports » de la page d'accueil. Les rapports silencieux sont utilisés pour les rapports utiles pour les données internes mais qui n'ont pas besoin d'être promus. Si vous n'êtes pas sûr, laissez ce champ vide."
},
"implicated_systems": {
"title": "Systèmes d'IA impliqués dans l'incident",
"text": "Si plusieurs, appuyez sur « entrée » pour commencer un nouvel élément"
},
"similarIncidentSearch": {
"title": "Rechercher des incidents similaires",
"text": "Recherchez un incident similaire ou différent en saisissant un ID d'incident. Si l'incident qui en résulte est similaire, cliquez sur « Oui », s'il est différent, cliquez sur « Non ». Si vous n'êtes pas sûr, cliquez sur « Pas sûr ». Une fois sélectionné, l'incident sera ajouté à la section « Incidents similaires et différents sélectionnés manuellement » du formulaire. Une fois ajouté, si vous souhaitez le supprimer, cliquez sur le bouton « Pas sûr »."
Expand Down
2 changes: 2 additions & 0 deletions site/gatsby-site/i18n/locales/fr/submit.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,7 @@
"Submit a new incident report to the Artificial Intelligence Incident Database.": "Soumettre un nouveau rapport d'incident à la base de données des incidents d'intelligence artificielle.",
"Draft saved": "Brouillon enregistré",
"Saving as draft...": "Enregistrement en tant que brouillon...",
"Implicated Systems": "Systèmes impliqués",
"What systems were involved in the incident?": "Quels systèmes étaient impliqués dans l'incident ?",
"Please confirm you are ready to submit this report. Report details cannot be changed after submission.": "Veuillez confirmer que vous êtes prêt à soumettre ce rapport. Les détails du rapport ne peuvent pas être modifiés après la soumission."
}
2 changes: 2 additions & 0 deletions site/gatsby-site/i18n/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,8 @@
"Random Incident": "Incident au hasard",
"Read the Source": "Lire la source",
"Risk Checklists": "Contrôle des risques",
"Implicated Systems": "Systèmes impliqués",
"and": "et",
"Manually-selected similar and dissimilar incidents": "Incidents similaires et dissemblables sélectionnés manuellement",
"Search similar/dissimilar Incident Id": "Rechercher un incident similaire/dissimilaire",
"Assigned similar/dissimilar incidents": "Incidents similaires/dissimilaires attribués",
Expand Down
4 changes: 3 additions & 1 deletion site/gatsby-site/i18n/locales/fr/validation.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@
"*Description is required": "*La description est requise",
"*Incident Date is required": "*Date de l'incident requise",
"*Incident Date required": "*Date de l'incident requise",
"*Incident ID(s) must be a number": "*L'ID de l'incident doit être un nombre"
"*Incident ID(s) must be a number": "*L'ID de l'incident doit être un nombre",
"Implicated Systems must have at least 3 characters": "Les systèmes impliqués doivent comporter au moins 3 caractères",
"Implicated Systems can't be longer than 200 characters": "Les systèmes impliqués ne peuvent pas comporter plus de 200 caractères"
}
4 changes: 3 additions & 1 deletion site/gatsby-site/i18n/locales/ja/entities.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@
"Editing Entity": "組織の編集",
"Back to Entity: {{name}}": "組織に戻る: {{name}}",
"Entity updated successfully.": "組織が正常に更新されました。",
"Error updating Entity.": "組織の更新中にエラーが発生しました。"
"Error updating Entity.": "組織の更新中にエラーが発生しました。",
"The AI implicated system is": "関連するAIシステムは です",
"The AI implicated systems are": "関連するAIシステムは です"
}
4 changes: 4 additions & 0 deletions site/gatsby-site/i18n/locales/ja/popovers.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@
"title": "あなたです!",
"text": "現在ログイン中なのでこの投稿は自動的にあなたのアカウントに関連づけられます。匿名で投稿するには、ブラウザウィンドウを匿名モードで開いて投稿してください。"
},
"implicated_systems": {
"title": "インシデントに関与したAIシステム",
"text": "複数ある場合は、新しい項目を入力するためにEnterキーを押してください"
},
"similarIncidentSearch": {
"title": "類似の事件を検索",
"text": "インシデント ID を入力して、類似または非類似のインシデントを検索します。結果のインシデントが類似している場合は「はい」をクリックし、非類似の場合は「いいえ」をクリックします。不明な場合は「不明」をクリックします。選択すると、インシデントはフォームの「手動で選択された類似および非類似のインシデント」セクションに追加されます。追加した後で削除したい場合は、「わからない」ボタンをクリックします。"
Expand Down
2 changes: 2 additions & 0 deletions site/gatsby-site/i18n/locales/ja/submit.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,7 @@
"Saving changes...": "変更を保存中...",
"Draft saved": "下書きが保存されました",
"Saving as draft...": "下書きとして保存中...",
"Implicated Systems": "関連システム",
"What systems were involved in the incident?": "このインシデントに関わるシステムは何ですか?",
"Please confirm you are ready to submit this report. Report details cannot be changed after submission.": "このレポートを送信する準備ができていることを確認してください。送信後にレポートの詳細を変更することはできません"
}
4 changes: 3 additions & 1 deletion site/gatsby-site/i18n/locales/ja/validation.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@
"Please review report. Some data is missing.": "レポートを確認してください。足りない情報があります",
"Please review submission. Some data is missing.": "投稿を確認してください。足りない情報があります",
"Some data is missing.": "足りない情報があります",
"Please review. Some data is missing.": "確認してください。足りない情報があります"
"Please review. Some data is missing.": "確認してください。足りない情報があります",
"Implicated Systems must have at least 3 characters": "関連システムは3文字以上でなければいけません",
"Implicated Systems can't be longer than 200 characters": "関連システムは200文字を超えることはできません"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
const config = require('../config');
/**
*
* @param {{context: {client: import('mongodb').MongoClient}}} context
*/

exports.up = async ({ context: { client } }) => {
await client.connect();

// New implicated_systems field on submissions and incidents collections from production db and history db

const submissionsCollection = client
.db(config.realm.production_db.db_name)
.collection('submissions');

const submissionsHistoryCollection = client
.db(config.realm.production_db.db_history_name)
.collection('submissions');

const incidentsCollection = client.db(config.realm.production_db.db_name).collection('incidents');

const incidentsHistoryCollection = client
.db(config.realm.production_db.db_history_name)
.collection('incidents');

const submissionsUpdates = await submissionsCollection.updateMany(
{},
{
$set: {
implicated_systems: [],
},
}
);

console.log(
`Updated ${submissionsUpdates.modifiedCount} submissions with new implicated_systems field`
);

const submissionsHistoryUpdates = await submissionsHistoryCollection.updateMany(
{},
{
$set: {
implicated_systems: [],
},
}
);

console.log(
`Updated ${submissionsHistoryUpdates.modifiedCount} submissions history with new created_at field`
);

const incidentsUpdates = await incidentsCollection.updateMany(
{},
{
$set: {
implicated_systems: [],
},
}
);

console.log(
`Updated ${incidentsUpdates.modifiedCount} incidents with new implicated_systems field`
);

const incidentsHistoryUpdates = await incidentsHistoryCollection.updateMany(
{},
{
$set: {
implicated_systems: [],
},
}
);

console.log(
`Updated ${incidentsHistoryUpdates.modifiedCount} incidents history with new created_at field`
);
};
2 changes: 2 additions & 0 deletions site/gatsby-site/page-creators/createEntitiesPages.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const createEntitiesPages = async (graphql, createPage) => {
Alleged_deployer_of_AI_system
Alleged_developer_of_AI_system
Alleged_harmed_or_nearly_harmed_parties
implicated_systems
reports {
report_number
}
Expand Down Expand Up @@ -55,6 +56,7 @@ const createEntitiesPages = async (graphql, createPage) => {
incidentsAsDeveloper: entity.incidentsAsDeveloper,
incidentsAsBoth: entity.incidentsAsBoth,
incidentsHarmedBy: entity.incidentsHarmedBy,
incidentsImplicatedSystems: entity.incidentsImplicatedSystems,
relatedEntities: entity.relatedEntities,
responses: entity.responses,
},
Expand Down
Loading

0 comments on commit cce27d9

Please sign in to comment.