Hi,
i would like to place some text into tc summary and tc steps in case of a new tc. where can i do that?
thx
regards
Kester
How to set default values for new TC
Implementation is simple => is better do it well from start.
Then my suggestions
define new config parameter
$g_testcase_template->summary="Your text here";
$g_testcase_template->steps="Your text here";
$g_testcase_template->expected_results="Your text here";
Then try look debug code (I've no time now) to understand what page is called when you choose new testcase.
Then change page to get config:
$my_template=config_get('testcase_template');
then init FCK editor objetcs with
$my_template->summary
$my_template->steps
$my_template->expected_results
Please send the code back to me (or attach on mantis issue)
enjoy developing
Then my suggestions
define new config parameter
$g_testcase_template->summary="Your text here";
$g_testcase_template->steps="Your text here";
$g_testcase_template->expected_results="Your text here";
Then try look debug code (I've no time now) to understand what page is called when you choose new testcase.
Then change page to get config:
$my_template=config_get('testcase_template');
then init FCK editor objetcs with
$my_template->summary
$my_template->steps
$my_template->expected_results
Please send the code back to me (or attach on mantis issue)
enjoy developing
thx. done.
that was eays.
what i did so far.
1) custom_config.inc.php
/* Defaultvalues */
$g_testcase_template->summary="My summary";
$g_testcase_template->steps="My steps";
$g_testcase_template->expected_results="My Results";
2) tcEdit.php
at the end of the file where we have this:
if ($show_newTC_form)
{
...
$my_template = config_get('testcase_template');
foreach ($a_ofck as $key)
{
// Warning:
// the data assignment will work while the keys in $the_data are identical
// to the keys used on $oFCK.
$of = &$oFCK[$key];
/* $of->Value = ""; old version */
$of->Value = $my_template->$key;
$smarty->assign($key, $of->CreateHTML());
}
}
. this is fine for me.
regards
Kester

what i did so far.
1) custom_config.inc.php
/* Defaultvalues */
$g_testcase_template->summary="My summary";
$g_testcase_template->steps="My steps";
$g_testcase_template->expected_results="My Results";
2) tcEdit.php
at the end of the file where we have this:
if ($show_newTC_form)
{
...
$my_template = config_get('testcase_template');
foreach ($a_ofck as $key)
{
// Warning:
// the data assignment will work while the keys in $the_data are identical
// to the keys used on $oFCK.
$of = &$oFCK[$key];
/* $of->Value = ""; old version */
$of->Value = $my_template->$key;
$smarty->assign($key, $of->CreateHTML());
}
}

regards
Kester
-
- TestLink user
- Posts: 9
- Joined: Thu Feb 05, 2009 7:00 am