Add URL as custom field type

The release related discussions, plans and questions.
Locked
suryanshiva
TestLink user
Posts: 3
Joined: Fri Mar 06, 2009 2:36 pm

Add URL as custom field type

Post by suryanshiva »

Hi,
We need to add a custom field type as URL where we can give the link as refererence to MR we create in another tool. I am trying to find which part of the code creating these custom fields but I couldn't get it.

config.inc.php has the list for custom fields but not able to track where they get added actually

Can anybody please help me to add URL as a field?

Thanks,
Surya
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

there is no such thing, using an string cf would be enough.
Any way please ugrade to 1.8 RC5 and retest
suryanshiva
TestLink user
Posts: 3
Joined: Fri Mar 06, 2009 2:36 pm

Post by suryanshiva »

I did the code change for that to have URL field, so it opens the link when I click from test case execution.

Edited the following file:

testlink/lib/functions/cfield_mgr.class.php

Can I provide the changes so it will be usefull if anybody else need that option?
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

add issue on mantis and attach your code, well commented please
mkbutler
Advanced user
Posts: 33
Joined: Tue Jan 13, 2009 1:04 am

Solution

Post by mkbutler »

Hold off on reporting the bug.

If you want to use a URL in a custom field then set it to type string and turn on html_make_links.

I have 1.8 RC 2 and 5 and both of them have it enabled by default. I also created a custom field for links in my Test Cases and it's working just fine.

/**
* String checking and conversions
* Allow automatically convert www URLs and email adresses into clickable links
* used by function string_display_links() for example by custom fields.
* Valid values = ENABLED/DISABLED.
**/
$tlCfg->html_make_links = ENABLED;


MArk B.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

@mkbutler:
Thanks a lot for pointing user to documentation.
Sometimes you know it better than us (than have developed it)
Locked