Merge lp:~simonsp/ocsinventory-ocsreports/fix_missing_doublons_when_no_mac into lp:ocsinventory-ocsreports/stable-1.3

Proposed by Paul W. Simons
Status: Merged
Merge reported by: Gonéri Le Bouder
Merged at revision: not available
Proposed branch: lp:~simonsp/ocsinventory-ocsreports/fix_missing_doublons_when_no_mac
Merge into: lp:ocsinventory-ocsreports/stable-1.3
Diff against target: 15 lines (+4/-1)
1 file modified
doublons.php (+4/-1)
To merge this branch: bzr merge lp:~simonsp/ocsinventory-ocsreports/fix_missing_doublons_when_no_mac
Reviewer Review Type Date Requested Status
OCS Inventory Dev Team Pending
Review via email: mp+18147@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Paul W. Simons (simonsp) wrote :

Changed an sql statement in doublons.php so that if a computer does not have a mac address, it does not disappear from hostname or serial listings. Currently if a computer does not have a mac address, and it had the same serial or hostname as a computer that had a mac address, only that computer would show up in the doublons report. It was then impossible to merge a computer that did not have a network adapter before, and has one now.

Revision history for this message
Gonéri Le Bouder (goneri) wrote :

Thanks

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'doublons.php'
2--- doublons.php 2009-10-06 23:05:12 +0000
3+++ doublons.php 2010-01-27 17:24:19 +0000
4@@ -23,7 +23,10 @@
5 }
6
7 $fromBase="hardware h LEFT JOIN accountinfo a ON a.hardware_id = h.id LEFT JOIN bios b ON b.hardware_id = h.id LEFT OUTER JOIN networks n1 on b.hardware_id=n1.hardware_id";
8-$whereBase="n1.hardware_id = h.id ";
9+//This statement below is changed from n1.hardware_id = h.id to h.id
10+//IS NOT NULL to prevent an issue where pc's without mac address' do not show
11+//up under serials or hostame only reports.
12+$whereBase="h.id IS NOT NULL";
13 if( $mesMachines ) {
14 $whereBase .= "AND $mesMachines";
15 }

Subscribers

People subscribed via source and target branches

to status/vote changes: