Opened 12 years ago

Closed 12 years ago

#9953 closed defect (fixed)

Changing a testcase custom field value gives and error

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


Hello, 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 mod_wsgi python 2.7 tracgenericclass-1.1.2-py2.7.egg tracgenericworkflow-1.0.3-py2.7.egg testmanager-1.4.10-py2.7.egg

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 Roberto Longobardi 12 years ago.
Patched tracgenericclass

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by Roberto Longobardi

Attachment: added

Patched tracgenericclass

comment:1 Changed 12 years ago by Roberto Longobardi

Status: newassigned

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: tracgenericclass/trunk/tracgenericclass/

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

Ciao, Roberto

comment:2 Changed 12 years ago by Roberto Longobardi

Fixed with release 1.4.11.

comment:3 Changed 12 years ago by Roberto Longobardi

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Roberto Longobardi.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

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

Note: See TracTickets for help on using tickets.