Modify

Opened 10 years ago

Closed 9 years ago

#11958 closed defect (duplicate)

ValueError: list.remove(x): x not in list

Reported by: bobhy Owned by: Ryan J Ollos
Priority: normal Component: MasterTicketsPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

How to Reproduce

  1. Insert a bunch of tickets with dependencies via blocking and blocked.
  2. Do a batch update, clearing blocking and blocked by fields at same time.
    1. View tickets from 1 in a report.
    2. click 'batch modify'
    3. In 'add field', select Blocking
    4. In 'value', leave it alone to set value to None. (don't enter 0 or space)
    5. In 'add field', select Blocked By and leave it's value alone
  3. Click 'submit'
Expect
it works.
Observe
this error.

Might be related to #11075, I can't tell.

While doing a POST operation on /batchmodify, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'__FORM_TOKEN': u'49d9eca878a310f034cca5ac',
 'action_reassign_reassign_owner': u'bob',
 'action_resolve_resolve_resolution': u'fixed',
 'batchmod_submit': u'Change tickets',
 'batchmod_value_blockedby': u'',
 'batchmod_value_blocking': u'',
 'batchmod_value_comment': u'',
 'batchmod_value_parents': u'',
 'query_href': u'/cmms/query?status=accepted&status=assigned&status=new&status=reopened&col=id&col=summary&col=status&col=type&col=priority&col=milestone&col=component&col=blockedby&col=blocking&col=parents&col=wbs&report=19&order=priority',
 'selected_tickets': u'17,18,19,20,21,22,23,24,25,26,27,28'}

User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; rv:11.0) like Gecko

System Information

Trac 1.0.2beta1
Genshi 0.7 (without speedups)
GIT 1.8.3.msysgit.0
pysqlite 2.6.0
Python 2.7.8 (default, Jun 30 2014, 16:08:48) [MSC v.1500 64 bit (AMD64)]
setuptools 3.6
SQLite 3.6.21
jQuery 1.7.2
jQuery UI 1.8.21
jQuery Timepicker 1.0.1

Enabled Plugins

BackLinksMacro 7.0dev-r13928
TicketImport 0.8.3
timingandestimationplugin 1.3.7
Trac-jsGantt 0.11-r14075
TracAccountManager 0.4.4
TracIncludeMacro 3.0.0dev-r13471
TracMasterTickets 3.0.5dev-r13684
TracSubTicketsPlugin 0.2.0.dev-20140826
TracTags 0.8dev-r14041
TracTocMacro 11.0.0.4-r13602

Python Traceback

Traceback (most recent call last):
  File "f:\home\bob\src\tracstuff\trac\trac\web\main.py", line 506, in _dispatch_request
    dispatcher.dispatch(req)
  File "f:\home\bob\src\tracstuff\trac\trac\web\main.py", line 221, in dispatch
    resp = chosen_handler.process_request(req)
  File "f:\home\bob\src\tracstuff\trac\trac\ticket\batch.py", line 63, in process_request
    new_values, comment, action)
  File "f:\home\bob\src\tracstuff\trac\trac\ticket\batch.py", line 168, in _save_ticket_changes
    t.save_changes(req.authname, comment, when=when)
  File "f:\home\bob\src\tracstuff\trac\trac\ticket\model.py", line 365, in save_changes
    listener.ticket_changed(self, comment, author, old_values)
  File "f:\home\bob\src\tracstuff\masterticketsplugin\mastertickets\api.py", line 119, in ticket_changed
    links.save(author, comment, tkt.time_changed, db)
  File "f:\home\bob\src\tracstuff\masterticketsplugin\mastertickets\model.py", line 77, in save
    update_field(new_value)
  File "f:\home\bob\src\tracstuff\masterticketsplugin\mastertickets\model.py", line 70, in <lambda>
    update_field = lambda lst: lst.remove(str(self.tkt.id))
ValueError: list.remove(x): x not in list

Attachments (0)

Change History (2)

comment:1 Changed 9 years ago by anonymous

I had a similar problem

  • Create a ticket
  • Accidentally set it blocking itself

Any future updates to the blocking / blocked-by field cause this exact error.

comment:2 Changed 9 years ago by Jun Omae

Resolution: duplicate
Status: newclosed

A duplicate of #8792.

Modify Ticket

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