Hmm...How do I remove keyword assignment for a testcase ?

The release 1.6 is going to be unsupported by Community. Because our effort moves ahead. However there are still valuable informations for you.

Hmm...How do I remove keyword assignment for a testcase ?

Postby kirank » Thu May 04, 2006 8:10 pm

Is it a bug ? It seems that once I assign a keyword to a testcase, unless I delete and re-add the test case, the keyword sticks to the test case ( even after the kwd is deleted).

Pls help !

Thx !
Advanced user
Posts: 35
Joined: Mon Mar 27, 2006 1:55 am

Postby fman » Fri May 05, 2006 11:23 am

1. Use menu item assign keyword
2. choose the test case you want to un-assign a keyword (suppose the keyword if KEY1)
3. You will see in the combo the word KEY1 selected
4. While pressing the CONTRIL KEY, click on KEY1
5. Now KEY1 has to be unselected
6. click on ASSIGN Button
Member of TestLink Community
Posts: 3088
Joined: Tue Nov 15, 2005 7:19 am

Postby kirank » Fri May 05, 2006 3:02 pm

Thanks, fman , for your quick reply.
Sorry, I didn\'t phrase my question properly.
My situation is:
I create a keyword
Assign it to a test case
Delete the keyword
Then, edit the testcase, and try to unassign the keywrd( that shows in read mode). But, it does not show up in the combobox (since the kwd does not exist anymore).

Seems like the assignment of the no longer valid keyword stays/lingers on to testcases that the kwd was assigned to.

I would expect that if a kwd is deleted, all the assignments to any testcases for that kwd would also get removed.If not, I should be able to at least remove it from the combobox.

I hope I explained clearly. If not, pls don\'t spend time on it, not a biggie. I am very happy using TL, thanks for all the hard work you guys have put into it. It\'s really appreciated !!!
Advanced user
Posts: 35
Joined: Mon Mar 27, 2006 1:55 am

Postby mitchm101 » Wed May 17, 2006 6:37 pm

When you assign a keyword to a testcase, it is stored as text in the mgttestcase table in the keywords column as part of a csv string

If you are comfortable executing database queries you could execute a command like this to remove a specific keyword

update mgttestcase set keywords = replace(keywords,\'regression,\',\'\') where id = 3

In the above example, I remove keyword regression from testcase Id 3.
Make sure you have the comma after your keyword in the replace

if you want to do all testcases, just leave off the where clause

If you have any testcases in testsuites, then you will also need to do the same on the testcase table

update testcase set keywords = replace(keywords,\'regression,\',\'\') where mgttcid = 3

Notice in the where clause I used the mgttcid field. This field has the same value as the identity column in the mgttestcase field
TestLink user
Posts: 2
Joined: Wed May 17, 2006 5:41 pm

Postby kirank » Fri May 19, 2006 7:25 pm

thank you, that works !!!!!
Advanced user
Posts: 35
Joined: Mon Mar 27, 2006 1:55 am

Return to TestLink 1.6 (closed)

Who is online

Users browsing this forum: No registered users and 4 guests