Add URL as custom field type

The release related discussions, plans and questions.

Add URL as custom field type

Postby suryanshiva » Fri Mar 06, 2009 2:39 pm

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
suryanshiva
TestLink user
 
Posts: 3
Joined: Fri Mar 06, 2009 2:36 pm

Postby fman » Tue Mar 10, 2009 9:43 am

there is no such thing, using an string cf would be enough.
Any way please ugrade to 1.8 RC5 and retest
fman
Member of TestLink Community
 
Posts: 3019
Joined: Tue Nov 15, 2005 7:19 am

Postby suryanshiva » Wed Mar 11, 2009 11:24 am

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?
suryanshiva
TestLink user
 
Posts: 3
Joined: Fri Mar 06, 2009 2:36 pm

Postby fman » Wed Mar 11, 2009 4:43 pm

add issue on mantis and attach your code, well commented please
fman
Member of TestLink Community
 
Posts: 3019
Joined: Tue Nov 15, 2005 7:19 am

Solution

Postby mkbutler » Wed Mar 11, 2009 11:03 pm

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.
mkbutler
Advanced user
 
Posts: 33
Joined: Tue Jan 13, 2009 1:04 am

Postby fman » Thu Mar 12, 2009 4:40 pm

@mkbutler:
Thanks a lot for pointing user to documentation.
Sometimes you know it better than us (than have developed it)
fman
Member of TestLink Community
 
Posts: 3019
Joined: Tue Nov 15, 2005 7:19 am


Return to TestLink 1.7 (Closed)



Who is online

Users browsing this forum: No registered users and 2 guests

cron