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 2010-03-19 00:46:31

javerleo
Member
Registered: 2009-04-20
Posts: 11

Help wanted with custom fields

Hello.

I use GLPI 0.72.21 and want to use Custom fields plugin 1.1.6. The installation process was very straightforward with no errors. I can add the custom fields, which appear on the additional tab (Tracking page in my case). The problem is I don't see the new fields on the searching form, so I'm unable to find records matching certain criteria related to the new data.
Besides, I would like to show some of the new fields on the help desk cases list. Is that possible?
Finally, I want to know if I can create custom dropdowns populated with GLPI data (contacts, suppliers, etc.)

Thanks in advance for your suggestions.

Offline

#2 2010-03-19 04:14:00

gvargasdc
Member
Registered: 2009-10-21
Posts: 34

Re: Help wanted with custom fields

As far as I remember the plugin comes with two patches. One is to enable search on custom fields and the other to enable custom fields with file injection. Check the plugin folders for a directory with those two patches and run the one for searching. I have 0.72.3 though.


Glpi: 10.0.1

Offline

#3 2010-03-19 16:03:45

gvargasdc
Member
Registered: 2009-10-21
Posts: 34

Re: Help wanted with custom fields

To be more specific (now that I checked on my installation):

The folder "patch" inside the customfields plugin folder contains the patch files to enable search and file injection to work with custom fields. These are the files you will see under that folder:

  • data_injection-1.6.0.patch

  • glpi-0.72.patch

  • instructions.txt

Read instructions.txt for directions on how to apply the patch.

G.


Glpi: 10.0.1

Offline

#4 2010-04-17 21:56:14

subnet88
Member
Registered: 2010-04-17
Posts: 1

Re: Help wanted with custom fields

I am also having the same problem(Unable to search). Using GLPI .72.4. any Ideas?

Offline

#5 2010-04-19 11:33:57

saraben
Member
Registered: 2010-02-03
Posts: 101

Re: Help wanted with custom fields

I have also the same issue ...I tried to do what you recommended but when opening the instructions.text ...its specifies that

The instructions are for linux/unix systems and that for other systems we are supposed to open the patch files in a
text editor and add the new code to the appropriate files manually,

I'm on Vista and glpi 0.72.4 ....I dont know what new code should be added to the files manually ...any help?


thanks

Offline

#6 2010-04-19 21:54:06

gvargasdc
Member
Registered: 2009-10-21
Posts: 34

Re: Help wanted with custom fields

I don't run GLPI on windows but I'll try to help. In windows you should be able to manually update the required files using notepad and it should work. For the search functionality there are three files that need to be modified:

/inc/search.function.php
/ajax/dropdownMassiveActionField.php
/plugins/customfields/setup.php

Modifying /inc/search.function.php:

Make a backup of /inc/search.function.php (e.g. copy it to your desktop - just in case).
Now open /inc/search.function.php.
Search (Ctrl+F) for a line that says "return $options;" It should be somewhere in the beginning of the file (line 81 in 0.72.4)
Copy-Paste the following just BEFORE the "return $options;" line:

       ////////// begin modification for custom fields plugin /////////
       $plugin = new Plugin();
       if ($plugin->isActivated('customfields'))
       {
               $options = plugin_customfields_cleanSearchOption($options, $action);
       }
       ////////// end modification for custom fields plugin /////////

Modifying /ajax/dropdownMassiveActionField.php:

Make a backup of /ajax/dropdownMassiveActionField.php.
Open /ajax/dropdownMassiveActionField.php in notepad.
Search (Ctrl+F) for a line that reads "if (!$plugdisplay){" It should be in line 206 in 0.72.4
Now copy-Paste the following BEFORE the line that read "if (!$plugdisplay){":

                               ////////// begin modification for custom fields plugin /////////
                               elseif (substr($search["table"],0,25)=='glpi_plugin_customfields_')
                               {
                                       $function='plugin_customfields_MassiveActionsFieldsDisplay';
                                       if (function_exists($function)){
                                               $plugdisplay=$function($_POST["device_type"],$search["table"],$search["field"],$search["linkfield"]);
                                       }
                               }
                               ////////// end modification for custom fields plugin /////////

Modifying /plugins/customfields/setup.php:

Make a backup of /plugins/customfields/setup.php.
Open /plugins/customfields/setup.php in notepad
Find the line that reads "define('CUSTOMFIELDS_GLPI_PATCH_APPLIED', false);" (line 40) and change it to true:

define('CUSTOMFIELDS_GLPI_PATCH_APPLIED', true);

That should do it. To test log off, then log back in into GLPI web interface and see if you can search on custom fields values.

The above should have enabled search and massive modifications on custom fields. I run 0.72.3 in my production server, but I tested the changes above in my 0.72.4 test-bed and they worked for me.

Last edited by gvargasdc (2010-04-19 21:58:02)


Glpi: 10.0.1

Offline

#7 2010-04-21 14:04:53

saraben
Member
Registered: 2010-02-03
Posts: 101

Re: Help wanted with custom fields

Thank you so so much for such a conscied reply

It is really helpful ...you even made sure I know what is a backup and how to make a search tongue

anyways

define('CUSTOMFIELDS_GLPI_PATCH_APPLIED', true);  this was already set to true

after the modifications I still cannot see the feilds on the serach neither I can see them on the helpdesk form ...

:s

Offline

#8 2010-04-21 14:59:24

gvargasdc
Member
Registered: 2009-10-21
Posts: 34

Re: Help wanted with custom fields

you even made sure I know what is a backup and how to make a search

Sorry, didn't mean to be condescending... I provide helpdesk to end users and need to be very detailed; so I guess my daily helpdesk replies influence other things I write...

I'm also sorry it didn't work for you. What I posted was what I did to get it working. I didn't have to, but maybe try to deactive and active again the plugin? Btw, the customfields plugin version I use is 1.1.6.


Glpi: 10.0.1

Offline

#9 2010-04-21 16:17:51

saraben
Member
Registered: 2010-02-03
Posts: 101

Re: Help wanted with custom fields

Ohh no you dont have to be sorry smile ...I appreciate it  thanks smile

i'm using version 1.1.1 of the plugin ...I will try to find the other version ...if you have a link for it  I would be more greatful smile

Offline

#10 2010-04-22 01:13:29

chalkboardman
Member
From: California
Registered: 2009-12-03
Posts: 7
Website

Re: Help wanted with custom fields

I don't think you can search Custom Fields on the Tracking page. The tracking page uses a different search function.

Offline

#11 2010-04-26 11:48:33

saraben
Member
Registered: 2010-02-03
Posts: 101

Re: Help wanted with custom fields

I think I was not clear enough ...I want to show custom feilds on the helpdesk form

Offline

#12 2010-08-23 02:01:35

abdon
Member
Registered: 2010-08-23
Posts: 101

Re: Help wanted with custom fields

Sorry to revive this old thread but I am in need of custom fields, and can't find the plugin in question.

What's the name of the plugin that will let me add new inventory fields and to search on said fields? A link would be appreciated; searching on the plugins webiste for 'custom' 'field' or any other related word doesn't pull anything.

- Abdon

Offline

#13 2010-09-08 17:46:50

jvanwa1
Member
From: USA
Registered: 2010-06-07
Posts: 4

Re: Help wanted with custom fields

Offline

#14 2010-09-17 15:19:20

GPT
Member
From: Huelva, Spain
Registered: 2010-03-22
Posts: 20

Re: Help wanted with custom fields

Hi mates!!

I have patched the customfields plugin as say the file instructions.txt in the patch folder.

The only thing I want from this plugin is including custom fields in the searchs of the tickets but it still doesn't work!..

Have I to do anything else???

Does anybody get this???

Thanks in advance!!

Offline

#15 2010-09-20 13:34:51

GPT
Member
From: Huelva, Spain
Registered: 2010-03-22
Posts: 20

Re: Help wanted with custom fields

Hi again!!

Though I have GLPI running on a CentOS machine (Linux) I have patched manually the PHP files following the instructions given on this post. But it still does not work!..  I'm sure I'm doing something wrong, any detail that I don't notice but I don't know what!..!

Any help please???

Offline

#16 2010-09-20 14:03:24

ursyy25
Member
Registered: 2010-07-07
Posts: 44

Re: Help wanted with custom fields

Did You also add 'device.tabs.php' from http://www.glpi-project.org/forum/viewt … p?id=19736 ?

Offline

#17 2010-09-20 17:50:26

GPT
Member
From: Huelva, Spain
Registered: 2010-03-22
Posts: 20

Re: Help wanted with custom fields

Hello everybody!!
Thanks for your quick reply ursyy25!!

I really expected this was the problem but it's not. I added a php file called 'device.tabs.php' in the path /var/www/html/glpi/ajax with the content I read on 'http://www.glpi-project.org/forum/viewt … p?id=19736' but it didn't fix the problem.

The only thing I want is including custom field on searchs but I really don't kwon what else to do!.. Sorry, i'm a bit torn with this. DId you patch the plugin ursyy25? Is your GLPI running under Linux? No more people with this problem??

Thanks everybody!..
GLPI version: 0.72.4

Last edited by GPT (2010-09-20 17:58:56)

Offline

Board footer

Powered by FluxBB