Skip to content

Commit

Permalink
Merge branch '5.0/asset-search-chart' into 5.0-trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrandtbuffalo committed Jan 23, 2024
2 parents bd89c37 + 6b84e21 commit c61ea88
Show file tree
Hide file tree
Showing 12 changed files with 912 additions and 445 deletions.
8 changes: 7 additions & 1 deletion lib/RT/Assets.pm
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ our %FIELD_METADATA = (
Catalog => [ 'ENUM' => 'Catalog', ], #loc_left_pair
LastUpdated => [ 'DATE' => 'LastUpdated', ], #loc_left_pair
Created => [ 'DATE' => 'Created', ], #loc_left_pair
Creator => [ 'ENUM' => 'User', ], #loc_left_pair
LastUpdatedBy => [ 'ENUM' => 'User', ], #loc_left_pair

Linked => [ 'LINK' ], #loc_left_pair
LinkedTo => [ 'LINK' => 'To' ], #loc_left_pair
Expand All @@ -90,6 +92,7 @@ our %FIELD_METADATA = (
Contact => [ 'WATCHERFIELD' => 'Contact', ], #loc_left_pair
ContactGroup => [ 'MEMBERSHIPFIELD' => 'Contact', ], #loc_left_pair
CustomRole => [ 'WATCHERFIELD' ], # loc_left_pair
Watcher => [ 'WATCHERFIELD', ], #loc_left_pair

CustomFieldValue => [ 'CUSTOMFIELD' => 'Asset' ], #loc_left_pair
CustomField => [ 'CUSTOMFIELD' => 'Asset' ], #loc_left_pair
Expand Down Expand Up @@ -396,7 +399,10 @@ sub AddRecord {
my $asset = shift;
return unless $asset->CurrentUserCanSee;

return if $asset->__Value('Status') eq 'deleted'
# No need to check "deleted" if it's from AssetSQL(_sql_query is set). This
# also short circuits Status check for RT::Report::Assets::Entry, which
# doesn't have Status column
return if !$self->{_sql_query} and $asset->__Value('Status') eq 'deleted'
and not $self->{'allow_deleted_search'};

$self->SUPER::AddRecord($asset, @_);
Expand Down
1 change: 1 addition & 0 deletions lib/RT/Interface/Web/MenuBuilder.pm
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,7 @@ sub BuildMainNav {
}
elsif ( $class eq 'RT::Assets' ) {
$current_search_menu->child( bulk => title => loc('Bulk Update'), path => "/Asset/Search/Bulk.html$args" );
$current_search_menu->child( chart => title => loc('Chart'), path => "/Search/Chart.html$args" );
}
elsif ( $class eq 'RT::Transactions' ) {
$current_search_menu->child( chart => title => loc('Chart'), path => "/Search/Chart.html$args" );
Expand Down
Loading

0 comments on commit c61ea88

Please sign in to comment.