Duplicate MAC show only the first mac adress

Bug #918085 reported by Poil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OCS Inventory: OCSReports
Fix Released
Medium
Erwan

Bug Description

Hi,

When going on https://xxxxxxxxxx/ocsreports/index.php?function=admin_double, MAC address only: show only the first mac

the query is
SELECT a.TAG, n.macaddr, b.ssn, h.ID, h.LASTDATE, h.NAME, h.WORKGROUP, h.OSNAME, h.USERID, h.MEMORY, h.PROCESSORS, h.IPADDR, h.DESCRIPTION, h.FIDELITY, h.LASTCOME, h.PROCESSORN, h.PROCESSORT, h.USERAGENT, h.SWAP, h.WINPRODKEY, h.WINPRODID from hardware h left join accountinfo a on h.id=a.hardware_id ,bios b, networks n where h.id=n.hardware_id and h.id=b.hardware_id and h.id in ( '33', '236', '307', '716', '1277', '1373', '1396', '1433', '1444', '1445', '1447', '1451', '1469', '1470', '1477', '1489', '1491', '1499', '1515', '1527', '1557', '1575', '1578', '1594', '1597', '1619', '1623', '1628', '1633', '1635', '1636', '1637', '1638', '1639', '1640', '1641', '1644', '1648' ) and n.macaddr in ( '00:15:5D:21:0B:01' ) group by h.id order by 1 ASC limit 1000000

The error is here : n.macaddr in ( '00:15:5D:21:0B:01' )

After removing this code from ./plugins/main_sections/ms_doubles/ms_doubles.php
        /*if (($protectedPost['detail'] == "macaddress" or $protectedPost['detail'] == "macaddress_serial")
                         and count($list_info)>0){
                $sql['SQL'] .= " and n.macaddr in ";
                $sql=mysql2_prepare($sql['SQL'],$sql['ARG'],$list_info[$protectedPost['detail']]);

        }*/
this request is working fine.

Best regards,

Revision history for this message
Erwan (airoine) wrote :

what is your ocs GUI version?

Changed in ocsinventory-ocsreports:
assignee: nobody → Erwan (airoine)
status: New → Incomplete
Erwan (airoine)
Changed in ocsinventory-ocsreports:
status: Incomplete → Confirmed
importance: Undecided → Medium
status: Confirmed → In Progress
Revision history for this message
Erwan (airoine) wrote :

hello

your patch don't works properly. In fact, we need this part of this code to show only one card if the computer have more than one.

So, I have just post a fix (http://bazaar.launchpad.net/~ocsinventory-core/ocsinventory-ocsreports/stable-2.0/revision/811)

can you try it?

best regards

Changed in ocsinventory-ocsreports:
status: In Progress → Fix Committed
Revision history for this message
Poil (poil) wrote :

Hi,

It's working fine :)

best regards

Revision history for this message
Erwan (airoine) wrote :

thanks a lot for your help!

Best regards

Arthur Jaouen (arthur-z)
Changed in ocsinventory-ocsreports:
status: Fix Committed → Won't Fix
status: Won't Fix → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.