[Bps-public-commit] rt-extension-assets branch, master, updated. 1.02rc1-4-gad4053b
? sunnavy
sunnavy at bestpractical.com
Fri Nov 14 20:52:06 EST 2014
The branch, master has been updated
via ad4053b4bcd1fb896fe50ea8f1abc679478e2261 (commit)
from 18430bb862cd932b9f788b2ca3c28615364f1176 (commit)
Summary of changes:
lib/RT/Extension/Assets.pm | 7 +++++++
1 file changed, 7 insertions(+)
- Log -----------------------------------------------------------------
commit ad4053b4bcd1fb896fe50ea8f1abc679478e2261
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Mar 5 18:03:23 2014 -0500
Just directly to asset display page based on id in quick search
diff --git a/lib/RT/Extension/Assets.pm b/lib/RT/Extension/Assets.pm
index 83145fa..136000e 100644
--- a/lib/RT/Extension/Assets.pm
+++ b/lib/RT/Extension/Assets.pm
@@ -229,6 +229,13 @@ RT->AddJavaScript("RTx-Assets.js");
my @PassArguments;
if ($ARGSRef->{q}) {
+ if ($ARGSRef->{q} =~ /^\d+$/) {
+ my $asset = RT::Asset->new( $session{CurrentUser} );
+ $asset->Load( $ARGSRef->{q} );
+ RT::Interface::Web::Redirect(
+ RT->Config->Get('WebURL')."Asset/Display.html?id=".$ARGSRef->{q}
+ ) if $asset->id;
+ }
$args{'Assets'}->SimpleSearch( Term => $ARGSRef->{q}, Catalog => $args{Catalog} );
push @PassArguments, "q";
} elsif ( $ARGSRef->{'SearchAssets'} ){
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list