Aha! I have managed to replicate it and have attached a small patch you
can try.

However I think you're getting this error because you're using
'checkbox' as a field type, and the code isn't complete yet.

On Wed, Jan 18, 2006 at 01:58:40PM +1100, Alec Thomas wrote:
> Idan,
> 
> I can't replicate this at all. I've completely reinstalled Trac, the
> environment and the plugin and have not seen this error.
> 
> If you try the sandbox and you still get this error, zip up your
> Trac environment (*just* the env, nothing else) and mail it to
> [EMAIL PROTECTED], and I'll have a look using your environment.
> 
> Thanks,
> Alec
> 
> On Tue, Jan 17, 2006 at 09:04:54PM +0200, Idan Miller wrote:
> > Hi,
> > 
> > We are very happy to see the workflow patch hapenning since it is a very 
> > desired feature for us.
> > 
> > I have tried checking out a fresh copy of trac's trunk, applying the 
> > patch and followed the exact installations notes.
> > 
> > However, when I try to compose a new ticket, the screen layout seems 
> > wrong, much of the properties go out of the screen to the right and also 
> > there are duplicate fields like summary and description for the ticket.
> > 
> > I have tried to work with alect on that but we didn't get anywhere, he 
> > doesn't get the error but I do.
> > 
> > What can be wrong?
> > 
> > Also, when I try to submit a ticket I get the following error:
> > 
> > Traceback (most recent call last):
> >  File "/usr/lib/python2.4/site-packages/trac/web/modpython_frontend.py", 
> >  line 206, in handler
> >    dispatch_request(mpr.path_info, mpr, env)
> >  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 139, in 
> >  dispatch_request
> >    dispatcher.dispatch(req)
> >  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 107, in 
> >  dispatch
> >    resp = chosen_handler.process_request(req)
> >  File "/usr/lib/python2.4/site-packages/trac/ticket/web_ui.py", line 83, in 
> >  process_request
> >    self._do_create(req, db)
> >  File "/usr/lib/python2.4/site-packages/trac/ticket/web_ui.py", line 137, 
> >  in _do_create
> >    ticket.populate(req.args)
> >  File "/usr/lib/python2.4/site-packages/trac/ticket/model.py", line 125, in 
> >  populate
> >    self[name] = values.get(name, '')
> >  File "/usr/lib/python2.4/site-packages/trac/ticket/model.py", line 118, in 
> >  __setitem__
> >    value = value.strip()
> > AttributeError: 'list' object has no attribute 'strip'
> > 
> > Any ideas what can be wrong? Running on a gentoo system.
> > 
> > And another quick question, what is the sandbox and what does it mean 
> > that the workflow patch has moved there? does it mean there are more 
> > changes it will be included in 0.9.4?
> > 
> > Thanks!
> > 
> > Idan Miller.
> 
> -- 
> Evolution: Taking care of those too stupid to take care of themselves.
> _______________________________________________
> Trac-dev mailing list
> [email protected]
> http://lists.edgewall.com/mailman/listinfo/trac-dev
> 

-- 
Evolution: Taking care of those too stupid to take care of themselves.
Index: trac/ticket/model.py
===================================================================
--- trac/ticket/model.py        (revision 2803)
+++ trac/ticket/model.py        (working copy)
@@ -114,8 +114,12 @@
             del self._old[name]
         if value:
             field = [field for field in self.fields if field['name'] == name]
-            if field and field[0].get('type') != 'textarea':
-                value = value.strip()
+            if field:
+                type = field[0].get('type')
+                if type == 'checkbox':
+                    value = '|'.join([option.strip() for option in value])
+                elif type != 'textarea':
+                    value = value.strip()
         self.values[name] = value
 
     def populate(self, values):
_______________________________________________
Trac-dev mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-dev

Reply via email to