You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2009-08-13 16:20:55

micha_g
Member
Registered: 2009-07-28
Posts: 15

Monitor Import - Empty Serial

Hi,

i think i have found a bug:
inc/ocsng.function.php Line: 2450

// First pass - check if all serial present
if ($DBocs->numrows($result) > 0) {
        while ($line = $DBocs->fetch_array($result)) {
                if (empty($line["SERIAL"])) {
                        $checkserial=false;
                }
                $lines[]=clean_cross_side_scripting_deep(addslashes_deep($line));
        }
}

if one of all monitor serials is blank the import dosnt work if "unique on serial" is set

Offline

#2 2009-08-13 16:35:57

tsmr
GLPI-DEV
From: Rennes
Registered: 2005-08-26
Posts: 11,632
Website

Re: Monitor Import - Empty Serial

glpi version  perhaps ? no ?


Xavier Caillaud
Blog GLPI Infotel

Offline

#3 2009-08-13 16:43:44

micha_g
Member
Registered: 2009-07-28
Posts: 15

Re: Monitor Import - Empty Serial

0.72.1

Offline

#4 2009-08-14 10:14:19

micha_g
Member
Registered: 2009-07-28
Posts: 15

Re: Monitor Import - Empty Serial

ok ... it's no bug... my mistake...

i have a question....
i have acer monitors where the serial number is not stored in the right field ...

Example with 22 monitors:
Hersteller: Acer, Inc.
Ueberschrift: AL2023 
Hergestellt am (Woche/Jahr): ACR.07F0.7460068D (46/2007) 
Typ: RGB color 
Seriennummer: L670B0608133

Hersteller: Acer, Inc.
Ueberschrift: AL2023 
Hergestellt am (Woche/Jahr): ACR.07F0.7460067C (46/2007) 
Typ: RGB color 
Seriennummer: L670B0608133

The original serial numbers are
ETL670B0607460068D8133
ETL670B0607460067C8133

i write a scripte (modified/monitor_fix_serial.php) that manipulates the monitor serial number:

<? 
if ($line["SERIAL"] == "L670B0608133"){
        $line["SERIAL"] = "ET" . substr($line["SERIAL"],0,8) . substr($line["DESCRIPTION"],9,8) . substr($line["SERIAL"],8);
}
?>

and added the line:

include("../modified/monitor_fix_serial.php");

to inc/ocsng.function.php at line 2467 after

$mon = array ();
$mon["name"] = $line["CAPTION"];

but when there are new monitors were imported automatically bei ocs mass import, there is one monitor with serial "L670B0608133"

in what parts of what scripts were the serial number of monitores synced from ocs inventory to glpi?

Offline

#5 2009-08-14 10:18:32

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: Monitor Import - Empty Serial

I think this must be fixed in OCS, not in GLPI.

Latest OCS agent  provides a fix for some Acer model.
Next version will provide a fix for (near) all Acer model.

Next version will probably integrate this feature in the OCS server (rather than in the agent)

+


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#6 2009-08-14 10:28:38

micha_g
Member
Registered: 2009-07-28
Posts: 15

Re: Monitor Import - Empty Serial

i use agent version 1.02 (internal version 4.0.5.4)

is this the newest agent?

Offline

#7 2009-08-14 10:38:44

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: Monitor Import - Empty Serial

Yes

But it doesn't handle AL2023 (only AL1916, some B223W, and some others)

+


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#8 2009-08-14 11:32:43

micha_g
Member
Registered: 2009-07-28
Posts: 15

Re: Monitor Import - Empty Serial

can i help, that this model will be supported in the next version?

Offline

#9 2009-08-14 11:37:34

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: Monitor Import - Empty Serial

As I say : "Next version will provide a fix for (near) all Acer model."

+


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

Board footer

Powered by FluxBB