[Rt-commit] rt branch 5.0/fix-selfservice-asset-display-actions created. rt-5.0.2-277-g7659b60dde

BPS Git Server git at git.bestpractical.com
Fri Jun 17 15:34:12 UTC 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/fix-selfservice-asset-display-actions has been created
        at  7659b60ddef775f792f286c1d1fcd27b62e56347 (commit)

- Log -----------------------------------------------------------------
commit 7659b60ddef775f792f286c1d1fcd27b62e56347
Author: Brian Conry <bconry at bestpractical.com>
Date:   Fri Jun 17 10:21:28 2022 -0500

    Fix runtime error in SelfService Asset Display
    
    Change 755042f6a99 moved the menu building logic from a mason component
    into a Perl module.  As part of this conversion one instance of an
    RT::Interface::Web function call (Menu) wasn't converted into a method
    call on an appropriate object, triggering a runtime error when viewing
    /SelfService/Asset/Display.html.
    
    Fixes: I#37377

diff --git a/lib/RT/Interface/Web/MenuBuilder.pm b/lib/RT/Interface/Web/MenuBuilder.pm
index c68de8ed1c..7260a75c78 100644
--- a/lib/RT/Interface/Web/MenuBuilder.pm
+++ b/lib/RT/Interface/Web/MenuBuilder.pm
@@ -1712,7 +1712,7 @@ sub BuildSelfServiceNav {
         $page->child("display",     title => loc("Display"),        path => "/SelfService/Asset/Display.html?id=$id");
         $page->child("history",     title => loc("History"),        path => "/SelfService/Asset/History.html?id=$id");
 
-        if (Menu->child("new")) {
+        if ($home->child("new")) {
             my $actions = $page->child("actions", title => loc("Actions"));
             $actions->child("create-linked-ticket", title => loc("Create linked ticket"), path => "/SelfService/Asset/CreateLinkedTicket.html?Asset=$id");
         }

-----------------------------------------------------------------------


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list