Opened 2 years ago

Closed 2 years ago

#9953 closed defect (fixed)

Changing a testcase custom field value gives and error

Reported by: vnemes Owned by: seccanj
Priority: normal Component: TestManagerForTracPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12


Every time I try to modify the value of a custom field, I get a popup with the following error message:

An error occurred performing the operation.

Please try again. 

The thing is, if I reload the page, the change is done and it appears in the changes history, despite the error message.

If i put a breakpoint with Firebug in testmanager.js/doAjaxCall() that is called from testmanager.js/sendUpdate() and look at the return value, it is:

"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ""> <html xmlns=""> </html>"

The expected value should be "OK", otherwise an error is generated

The trac log shows the following:

2012-04-10 17:55:41,707 Trac[model] DEBUG: Provider for realm testcase is <testmanager.model.TestManagerModelProvider object at 0x02DFE5B0>
2012-04-10 17:55:41,707 Trac[model] DEBUG: Object key is {u'id': u'8'}
2012-04-10 17:55:41,707 Trac[model] DEBUG: >>> create_instance - testcase {u'id': u'8'}
2012-04-10 17:55:41,707 Trac[model] DEBUG: Title: None
2012-04-10 17:55:41,707 Trac[model] DEBUG: Description: None
2012-04-10 17:55:41,707 Trac[model] DEBUG: >>> get_fields
2012-04-10 17:55:41,707 Trac[model] DEBUG: <<< get_fields
2012-04-10 17:55:41,709 Trac[model] DEBUG: >>> _fetch_object
2012-04-10 17:55:41,709 Trac[model] DEBUG: Searching for testcase: WHERE 1=1 AND id=%%s
2012-04-10 17:55:41,709 Trac[model] DEBUG: id = 8
2012-04-10 17:55:41,709 Trac[model] DEBUG: Object found.
2012-04-10 17:55:41,710 Trac[model] DEBUG: Title: testcase7
2012-04-10 17:55:41,710 Trac[model] DEBUG: <<< _fetch_object
2012-04-10 17:55:41,710 Trac[model] DEBUG: Exists: True
2012-04-10 17:55:41,710 Trac[model] DEBUG: {u'testcaseproperty1': u'Default value', u'testcaseproperty': u'Default value', 'page_name': u'TC_TT0_TT1_TC8', 'id': u'8'}
2012-04-10 17:55:41,710 Trac[model] DEBUG: <<< create_instance
2012-04-10 17:55:41,710 Trac[model] DEBUG: Value before: Default value
2012-04-10 17:55:41,710 Trac[model] DEBUG: Changing field value.
2012-04-10 17:55:41,710 Trac[model] DEBUG: Value after: modified
2012-04-10 17:55:41,710 Trac[model] DEBUG: >>> save_changes
2012-04-10 17:55:41,721 Trac[model] DEBUG: <<< save_changes

My environment is:
trac 0.12
python 2.7

I have added this 2 custom testcase fields in trac.ini:

testcaseproperty = text
testcaseproperty.value = Default value
testcaseproperty1 = text
testcaseproperty1.value = Default value

I'm using Firefox 11 + Firebug

Attachments (1) (7.0 KB) - added by seccanj 2 years ago.
Patched tracgenericclass

Download all attachments as: .zip

Change History (4)

Changed 2 years ago by seccanj

Patched tracgenericclass

comment:1 Changed 2 years ago by seccanj

  • Status changed from new to assigned

You're right, I forgot to check-in the tracgenericclass part of the enhancement to show an error dialog in case an Ajax call fails.

Thanks for reporting this and for the problem determination :D

Before testmanager 1.4.11, which will contain this fix, comes out you can find the patched file in attachment.

Replace it into:

build and replace the TracGenericClass-1.1.2-py2.7.egg file under the Trac plugins directory.

Please, let me know if this fixes the bug and close this ticket :D


comment:2 Changed 2 years ago by seccanj

Fixed with release 1.4.11.

comment:3 Changed 2 years ago by seccanj

  • Resolution set to fixed
  • Status changed from assigned to closed

Add Comment

Modify Ticket

as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from seccanj. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.