View Issue Details

IDProjectCategoryView StatusLast Update
1489RackTablesVMs/containerspublic2015-07-22 16:49
ReporterGeoffMaciolek Assigned Toadoom42  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Product Version0.20.10 
Target Version0.20.11Fixed in Version0.20.11 
Summary1489: Functionality to search for objects by comment (Patch enclosed)
DescriptionRackTables search allows searching by comment in many types of resources, but not VMs, other objects. Here's a patch to resolve that!
Steps To Reproduce* Search for something in a VM's comment field.

Results: n/a!

* Apply patch
* Search for something in a VM's comment field.

Results: works!

Testing: needed?
Additional InformationThis doesn't return the comment field as part of the search results; I think this is actually OK, as comment fields can be *huge.*

The patch (also attached):

--- ori/database.php 2015-07-21 19:26:35.555753483 -0400
+++ commentsearch/database.php 2015-07-21 19:26:41.515753231 -0400
@@ -3122,7 +3122,7 @@
 function getObjectAttrsSearchResults ($what)
 {
        $ret = array();
- foreach (array ('name', 'label', 'asset_no') as $column)
+ foreach (array ('name', 'label', 'asset_no', 'comment') as $column)
        {
                $tmp = getSearchResultByField
                (
TagsNo tags attached.

Activities

GeoffMaciolek

GeoffMaciolek

2015-07-22 01:29

reporter  

search-vm-comments.patch (438 bytes)   
--- ori/database.php    2015-07-21 19:26:35.555753483 -0400
+++ commentsearch/database.php  2015-07-21 19:26:41.515753231 -0400
@@ -3122,7 +3122,7 @@
 function getObjectAttrsSearchResults ($what)
 {
        $ret = array();
-       foreach (array ('name', 'label', 'asset_no') as $column)
+       foreach (array ('name', 'label', 'asset_no', 'comment') as $column)
        {
                $tmp = getSearchResultByField
                (
search-vm-comments.patch (438 bytes)   
GeoffMaciolek

GeoffMaciolek

2015-07-22 16:19

reporter   ~0002903

I've also submitted this as a GitHub pull request: https://github.com/RackTables/racktables/pull/130

Issue History

Date Modified Username Field Change
2015-07-22 01:29 GeoffMaciolek New Issue
2015-07-22 01:29 GeoffMaciolek Status new => assigned
2015-07-22 01:29 GeoffMaciolek Assigned To => adoom42
2015-07-22 01:29 GeoffMaciolek File Added: search-vm-comments.patch
2015-07-22 16:19 GeoffMaciolek Note Added: 0002903
2015-07-22 16:49 adoom42 Status assigned => closed
2015-07-22 16:49 adoom42 Resolution open => fixed
2015-07-22 16:49 adoom42 Fixed in Version => 0.20.11
2015-07-22 16:49 adoom42 Target Version => 0.20.11