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-31 15:43:55

Bug Reporter
Member
Registered: 2008-09-15
Posts: 79

Mass OCS Import Plugin customization

I would like to add some fields to the mass ocs import plugin options.  I have information in administrative fields within OCS that I need to get into GLPI, but those fields aren't available as selections.  I have looked at the code and am looking for some direction as to all the places I need to make modifications to accomplish this.  I believe I need to modify ocsng.class.php to get the additional fields on the form, but what do I need to modify within the mass import plugin to pick-up this configuration? 

I need to get the following information from OCS into GLPI:

OCS admin field               GLPI field
technician                        glpi_computers.tech_num (lookup in glpi_users)
status                              glpi_computers.state (lookup in glpi_dropdown_state)

Any help is appreciated.


PROD: RHEL 5 on x86 32bit -- PHP 5.1.6 -- Apache 2.2.3 -- MySQL 5.0.77  --  GLPI 0.72.3 -- OCS-NG 1.02.1/5003
DEV:   RHEL 5 on x86 32bit -- PHP 5.1.6 -- Apache 2.2.3 -- MySQL 5.0.77  --  GLPI 0.72.4 -- OCS-NG 1.02.1/5003

Offline

#2 2009-08-31 15:54:11

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

Re: Mass OCS Import Plugin customization

I don't think this is a massocsimport issue.

The syncnhonization is handled in GLPI not in massocsimport plugin.

+


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

#3 2009-08-31 16:09:05

Bug Reporter
Member
Registered: 2008-09-15
Posts: 79

Re: Mass OCS Import Plugin customization

If I make the following changes, would that be enough?

ocsng.class.php:  Add a section in the ocsFormConfig function to add the additional fields to the form
ocsng.class.php:  Add a section in the updateAdminInfo function to insert the admin info into the DB

Is there more to it than that?  Does the mass import plugin need to know anything about these new fields?  I need these fields for new items and synchronized items.


PROD: RHEL 5 on x86 32bit -- PHP 5.1.6 -- Apache 2.2.3 -- MySQL 5.0.77  --  GLPI 0.72.3 -- OCS-NG 1.02.1/5003
DEV:   RHEL 5 on x86 32bit -- PHP 5.1.6 -- Apache 2.2.3 -- MySQL 5.0.77  --  GLPI 0.72.4 -- OCS-NG 1.02.1/5003

Offline

#4 2009-09-02 17:49:07

Bug Reporter
Member
Registered: 2008-09-15
Posts: 79

Re: Mass OCS Import Plugin customization

I'm sorry to ask again, but I'm having a tough time figuring this out on my own.  Can anyone help me to add two fields in the Setup > OCSNG Mode > General Information > OCS Administrative Information section?  I need to map 2 administrative fields in OCS to status and technician fields in GLPI.  I need these fields to come over from OCS on import and sync.  I also need these values to move into history when changed, for reporting.

I though I had it figured out in my last post as to which files needed modified, but it appears I am not correct.  I'm not the best PHP coder, so that may be why I'm having such a tough time with this.  Any help is appreciated.


PROD: RHEL 5 on x86 32bit -- PHP 5.1.6 -- Apache 2.2.3 -- MySQL 5.0.77  --  GLPI 0.72.3 -- OCS-NG 1.02.1/5003
DEV:   RHEL 5 on x86 32bit -- PHP 5.1.6 -- Apache 2.2.3 -- MySQL 5.0.77  --  GLPI 0.72.4 -- OCS-NG 1.02.1/5003

Offline

#5 2009-09-02 18:35:31

wawa
GLPI-DEV
From: Montpellier / France
Registered: 2006-07-03
Posts: 6,019
Website

Re: Mass OCS Import Plugin customization

Bug Reporter wrote:

Can anyone help me

you can contact a partern. They can do it for you :
http://www.glpi-project.org/spip.php?article300

Offline

#6 2010-07-27 19:56:06

wakesk8
Member
Registered: 2010-03-07
Posts: 47

Re: Mass OCS Import Plugin customization

Is there any documentation on what needs to be updated on GLPI to make OCSNG import from OCS Admin fields?  I've got several custom fields that I'd like to map and get imported, need a little help getting started.

Thanks.

Offline

#7 2011-10-14 07:51:58

prsatpathy
Member
Registered: 2011-10-14
Posts: 1

Re: Mass OCS Import Plugin customization

I have added one asset tag in "Computers" table, can I add this in "OCS Administrative Information" to import from OCSNG?
Same issue of mine also, how can I add new OCS Admin fields ?
Or, if I will add that on "General informations Computer"s, will the import work?
Can anyone help me please.

Offline

Board footer

Powered by FluxBB