Skip to content

Commit afaa608

Browse files
authored
fix: Add/remove keyword on Test Suite fails (TestLinkOpenSourceTRMS#285)
Context (test project ID) is missing when a granted user wants to add/remove a keyword on a Test Suite. Add the test project ID on the requests used to add/remove keywords.
1 parent b0c64f3 commit afaa608

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

gui/templates/tl-classic/testcases/object_keywords.inc.tpl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ var remove_kw_msgbox_title = '{$remove_kw_msgbox_title|escape:'javascript'}';
2020
*
2121
*
2222
*/
23-
function keyword_remove_confirmation(item_id, kw_link_id, keyword, title, msg, pFunction) {
23+
function keyword_remove_confirmation(item_id, kw_link_id, keyword, title, msg, pFunction, project_id) {
2424
var my_msg = msg.replace('%i',keyword);
2525
var safe_title = escapeHTML(title);
2626
Ext.Msg.confirm(safe_title, my_msg,
2727
function(btn, text) {
28-
pFunction(btn,text,item_id,kw_link_id);
28+
pFunction(btn,text,item_id,kw_link_id,project_id);
2929
});
3030
}
3131
@@ -34,9 +34,9 @@ function keyword_remove_confirmation(item_id, kw_link_id, keyword, title, msg, p
3434
*
3535
*
3636
*/
37-
function remove_keyword(btn, text, item_id, kw_link_id) {
37+
function remove_keyword(btn, text, item_id, kw_link_id, project_id) {
3838
var my_action = fRoot + 'lib/testcases/containerEdit.php?doAction=removeKeyword&item_id='
39-
+ item_id + '&kw_link_id=' + kw_link_id;
39+
+ item_id + '&kw_link_id=' + kw_link_id + '&tproject_id=' + project_id;
4040
if( btn == 'yes' ) {
4141
window.location=my_action;
4242
}
@@ -51,6 +51,7 @@ var pF_remove_keyword = remove_keyword;
5151
<input type="hidden" name="item_id" id="item_id" value="{$args_item_id}" />
5252
<input type="hidden" name="containerType" id="containerType"
5353
value="{$gui->level}" />
54+
<input type="hidden" name="tproject_id" id="tproject_id" value="{$gui->tproject_id}" />
5455

5556

5657
{$kwView = $gsmarty_href_keywordsView|replace:'%s%':$gui->tproject_id}
@@ -67,7 +68,7 @@ var pF_remove_keyword = remove_keyword;
6768
{$kw_link_item.kw_link},
6869
'{$kw_link_item.keyword|escape:'javascript'}',
6970
remove_kw_msgbox_title, remove_kw_msgbox_msg,
70-
pF_remove_keyword);">
71+
pF_remove_keyword,{$gui->tproject_id});">
7172
<img src="{$tlImages.delete}" title="{$kw_labels.img_title_remove_keyword}" style="border:none" /></a>
7273
{/if}
7374
<br />

0 commit comments

Comments
 (0)