Custom fields not working

The release related discussions, plans and questions.
Locked
pvmeerbe
TestLink user
Posts: 6
Joined: Tue Dec 18, 2007 12:40 pm

Custom fields not working

Post by pvmeerbe »

Hi,

I installed testlink 1.7.1 (in fact started from 1.7.0 and updated to 1.7.1) using postgres 8.0.4 . And I was trying to use the custom field property. I can add the custom field (it is there in the db table, see below for logging & database part). I activated all options and chose available for test case.

However it doesn't show up while editing or creating a new test case. What am I doing wrong? Do I need to activate it somewhere?

The query executing while editing a test case seems to search for custom fields however returns empty when ran manually on a db shell :

SELECT CF.*,CFTP.display_order,CFDV.value AS value,CFDV.node_id AS node_id FROM custom_fields CF JOIN cfield_testprojects CFTP ON CFTP.field_id=CF.id JOIN cfield_node_types CFNT ON CFNT.field_id=CF.id AND CFNT.node_type_id=3 LEFT OUTER JOIN cfield_design_values CFDV ON CFDV.field_id=CF.id AND CFDV.node_id=0 WHERE CFTP.testproject_id=1 AND CFTP.active=1 AND CF.show_on_design=1 AND CF.enable_on_design=1 ORDER BY display_order,CF.id;


kind regards
Pieter

This is the debug logging while creating a custom field (text area) :
--------------------------------------------------------------------------------------------
[07/Dec/18 15:18:47][DEBUG][/lib/cfields/cfields_edit.php][admin][e4f1dfe2aa235d1192ff458fe6cd1d47]
test /lib/cfields/cfields_edit.php
[07/Dec/18 15:18:47][DEBUG][/lib/cfields/cfields_edit.php][admin][e4f1dfe2aa235d1192ff458fe6cd1d47]
SQL [1] executed [took 0.0041 secs][all took 0.0041 secs]:
SELECT * FROM node_types
[07/Dec/18 15:18:47][DEBUG][/lib/cfields/cfields_edit.php][admin][e4f1dfe2aa235d1192ff458fe6cd1d47]
SQL [2] executed [took 0.0004 secs][all took 0.0086 secs]:
SELECT * FROM node_types
[07/Dec/18 15:18:47][DEBUG][/lib/cfields/cfields_edit.php][admin][e4f1dfe2aa235d1192ff458fe6cd1d47]
SQL [3] executed [took 0.0036 secs][all took 0.0126 secs]:
SELECT CF.*, CFNT.node_type_id FROM custom_fields CF, cfield_node_types CFNT WHERE CF.id=CFNT.field_id AND name='test-pieter2'
[07/Dec/18 15:18:48][DEBUG][/lib/cfields/cfields_edit.php][admin][e4f1dfe2aa235d1192ff458fe6cd1d47]
SQL [4] executed [took 0.3960 secs][all took 0.4122 secs]:
INSERT INTO custom_fields (name,label,type,possible_values, show_on_design,enable_on_design, show_on_execution,enable_on_execution) VALUES('test-pieter2','Test pieter 2',20,'', 1,1, 1,1)
[07/Dec/18 15:18:48][DEBUG][/lib/cfields/cfields_edit.php][admin][e4f1dfe2aa235d1192ff458fe6cd1d47]
SQL [5] executed [took 0.0007 secs][all took 0.8089 secs]:
SELECT currval('custom_fields_id_seq')
[07/Dec/18 15:18:48][DEBUG][/lib/cfields/cfields_edit.php][admin][e4f1dfe2aa235d1192ff458fe6cd1d47]
SQL [6] executed [took 0.0264 secs][all took 0.836 secs]:
INSERT INTO cfield_node_types (field_id,node_type_id) VALUES(3,3)



This is the content of the db custom_fields table :
--------------------------------------------------------------------
testlink=# select * from custom_fields;
id | name | label | type | possible_values | default_value | valid_regexp | length_min | length_max | show_on_design | enable_on_design | show_on_execution | enable_on_execution
----+--------------+----------------+------+-----------------+---------------+--------------+------------+------------+----------------+------------------+-------------------+---------------------
3 | test-pieter2 | Test pieter 2 | 20 | | | | 0 | 0 | 1 | 1 | 1 | 1
2 | pieter-test | Testing Pieter | 0 | | | | 0 | 0 | 1 | 1 | 1 | 1
(2 rows)
Locked