From 6d097f181375a03d53c48967962caae15d013e2f Mon Sep 17 00:00:00 2001
From: quietone <quietone@2572884.no-reply.drupal.org>
Date: Tue, 11 Mar 2025 14:28:34 +1100
Subject: [PATCH] Issue #3508449 by cilefen, ultimike, nicxvan, mstrelan: Add
 link to Status Report from database updates completion page

---
 core/modules/system/src/Controller/DbUpdateController.php   | 6 ++++++
 .../tests/src/Functional/UpdateSystem/UpdateScriptTest.php  | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/core/modules/system/src/Controller/DbUpdateController.php b/core/modules/system/src/Controller/DbUpdateController.php
index 53cca91ced28..131b6a075d5b 100644
--- a/core/modules/system/src/Controller/DbUpdateController.php
+++ b/core/modules/system/src/Controller/DbUpdateController.php
@@ -710,6 +710,12 @@ protected function helpfulLinks(Request $request) {
         'url' => Url::fromRoute('system.admin')->setOption('base_url', $base_url),
       ];
     }
+    if ($this->account->hasPermission('administer site configuration')) {
+      $links['status-report'] = [
+        'title' => $this->t('Status report'),
+        'url' => Url::fromRoute('system.status')->setOption('base_url', $base_url),
+      ];
+    }
     return $links;
   }
 
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php
index 3f0de14a252a..210e41e840d5 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php
@@ -811,8 +811,9 @@ public function testSuccessfulMultilingualUpdateFunctionality(): void {
     $this->assertSession()->pageTextContains('Updates were attempted.');
     $this->assertSession()->linkExists('logged');
     $this->assertSession()->linkExists('Administration pages');
+    $this->assertSession()->linkExists('Status report');
     $this->assertSession()->elementNotExists('xpath', '//main//a[contains(@href, "update.php")]');
-    $this->clickLink('Administration pages');
+    $this->clickLink('Status report');
     $this->assertSession()->statusCodeEquals(200);
   }
 
-- 
GitLab