Modify

Opened 16 years ago

Closed 14 years ago

#3108 closed defect (fixed)

Batch modify plugin emitting internal error

Reported by: Richard Dunlap Owned by: CuriousCurmudgeon
Priority: normal Component: BatchModifyPlugin
Severity: major Keywords:
Cc: raj@…, dale.miller@… Trac Release: 0.11

Description

Using batchmodofy 0.2.0, Trac r7176 (0.11), Genshi r852 (0.5), attempting to use Batch Modify to change the milestone on a group of tickets defined with status, summary, priority and milestone filters. I received the following "internal error" after submitting the change:

TypeError: can only concatenate list (not "unicode") to list

The tickets remained unchanged.

Details

Request parameters:

{'__FORM_TOKEN': u'82bcd6399ec088ab7e055e42',
 'batchmod': u'Change tickets',
 'bmod_flag_milestone': u'on',
 'bmod_value_checkbox_billable': u'1',
 'bmod_value_milestone': u'4.3',
 'col': [u'id', u'summary', u'priority', u'status', u'type', u'component'],
 'milestone': u'4.2',
 'priority': u'High',
 'priority_mode': u'!',
 'selectedTickets': u'',
 'status': [u'assigned',
            u'beta',
            u'new',
            u'pending',
            u'reopened',
            u'resolved',
            u'verified'],
 'summary': [u'transaction', u'demonstration'],
 'summary_mode': [u'!~', u'!~']}

User Agent was: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14

System Information

Trac 0.11dev
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)]
setuptools 0.6c7
SQLite 3.3.4
pysqlite 2.3.2
Genshi 0.5dev
Subversion 1.4.6 (r28521)
jQuery: 1.2.3

Python Traceback

Traceback (most recent call last):
  File "c:\python25\lib\site-packages\trac-0.11dev-py2.5.egg\trac\web\main.py", line 423, in _dispatch_request
    dispatcher.dispatch(req)
  File "c:\python25\lib\site-packages\trac-0.11dev-py2.5.egg\trac\web\main.py", line 197, in dispatch
    resp = chosen_handler.process_request(req)
  File "c:\python25\lib\site-packages\trac-0.11dev-py2.5.egg\trac\ticket\query.py", line 749, in process_request
    constraints = self._get_constraints(req)
  File "c:\python25\lib\site-packages\trac-0.11dev-py2.5.egg\trac\ticket\query.py", line 838, in _get_constraints
    vals = [mode + x for x in vals]
TypeError: can only concatenate list (not "unicode") to list

Attachments (0)

Change History (11)

comment:1 Changed 16 years ago by anonymous

The second patch in #2312 solves this problem -- and also reveals the existence of the new checkboxes feature of which BatchModifyPlugin failed to inform (warn?) me.

Kudos on the new feature, but if I might make two suggestions:

  • I would submit a vote for making the default condition all selected, rather than all unselected (or allow this to be configured). I think many of those reporting problems in #2500 are simply being caught by the fact that, with the checkboxes not showing, everything is unselected. Even with visible checkboxes, I'm more liable to forget to check the "select all" box than not.
  • Announcing the new feature and updating the screen shot on the BatchModifyPlugin page might be wise. :-)

comment:2 Changed 16 years ago by Dave Gynn

Resolution: fixed
Status: newclosed

The latest patched version for 0.11 should resolve this issue. Please re-open if it still happens.

Regarding the suggestions...

  • I would rather error on the side of someone forgetting to check "select all" than for someone to accidentally update all of their tickets.
  • Good idea. I'll try to whip up a screenshot.

comment:3 Changed 15 years ago by wosc+trac@…

Resolution: fixed
Status: closedreopened

I'm seeing the same error on a Trac 0.11.2 with BatchModify r5485. Is there anything I can do to help debug this?

comment:4 Changed 15 years ago by justin watt

Still seeing this with Trac 0.11.1 using BatchModify 0.2.0

comment:5 Changed 15 years ago by anonymous

Have the same problem with trac 0.12...

Request parameters:

{'__FORM_TOKEN': u'1c2764ee5a4f709bcfd7460d',
 'batchmod': u'Change tickets',
 'bmod_flag_owner': u'on',
 'bmod_value_owner': u'user',
 'col': [u'id',
         u'summary',
         u'owner',
         u'type',
         u'priority',
         u'milestone',
         u'component'],
 'owner': [u'', u'filippo'],
 'owner_mode': [u'!', u'!'],
 'selectedTickets': u'335,329,327,324,320,319,316,306,300,292,268,265,230,215,214,210,204,203,201,188,142,111,104,102,87,86,83,82,80,79,78,57,37,36,8',
 'status': u'closed'}

User Agent was: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)

System Information

Trac 0.12dev-r7697
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)]
setuptools 0.6c9
SQLite 3.6.2
pysqlite 2.5.0
Genshi 0.6dev-r960
jQuery: 1.2.6

Python Traceback

Traceback (most recent call last):
  File "C:\Python25\lib\site-packages\trac-0.12dev_r7697-py2.5.egg\trac\web\main.py", line 456, in _dispatch_request
    dispatcher.dispatch(req)
  File "C:\Python25\lib\site-packages\trac-0.12dev_r7697-py2.5.egg\trac\web\main.py", line 213, in dispatch
    resp = chosen_handler.process_request(req)
  File "C:\Python25\lib\site-packages\trac-0.12dev_r7697-py2.5.egg\trac\ticket\query.py", line 771, in process_request
    constraints = self._get_constraints(req)
  File "C:\Python25\lib\site-packages\trac-0.12dev_r7697-py2.5.egg\trac\ticket\query.py", line 878, in _get_constraints
    vals = [mode + x for x in vals]
TypeError: can only concatenate list (not "unicode") to list

comment:6 Changed 14 years ago by CuriousCurmudgeon

Owner: changed from ashwin_phatak to CuriousCurmudgeon
Status: reopenednew

I am not sure if this is a problem with the batch modify plugin. It might be a problem with how Trac is concatenating the constraint mode to the constraint value. Has anybody seen this error without using the plugin? I am going to leave this on the backburner for now, but will come back to it in the future.

comment:7 Changed 14 years ago by anonymous

Cc: raj@… added; anonymous removed

comment:8 Changed 14 years ago by dale.miller@…

Cc: dale.miller@… added

I got "TypeError: can only concatenate list (not "unicode") to list" today using batch modify plugin to change the milestone. Using BatchModify 0.2.0 with

Trac:   	0.11.5
Python: 	2.5.1 (r251:54863, Sep 21 2007, 22:46:31) [GCC 4.2.1 (SUSE Linux)]
setuptools: 	0.6c8
MySQL:  	server: "5.0.77-community", client: "5.0.77", thread-safe: 1
MySQLdb: 	1.2.2
Genshi: 	0.5.1
mod_python: 	3.3.1
Subversion: 	1.6.6 (r40053)
jQuery:	        1.2.6

comment:9 Changed 14 years ago by anonymous

I see that BatchModify 0.4.1 is available. I will install it.

comment:10 in reply to:  9 Changed 14 years ago by dale.miller@…

Replying to anonymous:

I see that BatchModify 0.4.1 is available. I will install it.

I replaced BatchModify-0.2.0-py2.5.egg with BatchModify-0.4.1-py2.5.egg and the "IntegrityError" and "TypeError" that I had with 0.2.0 did not show up. Thank you.

comment:11 Changed 14 years ago by CuriousCurmudgeon

Resolution: fixed
Status: newclosed

Since the newest version of the plugin seems to have resolved this issue I am closing it.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain CuriousCurmudgeon.
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.