Opened 6 years ago

Closed 10 months ago

#9712 closed defect (wontfix)

IntegrityError in the database backend

Reported by: kailash.buki@… Owned by: Morris
Priority: high Component: FlexibleAssignToPlugin
Severity: major Keywords:
Cc: Trac Release: 0.12


While using flexibleassignto plugin with configuration options

ensure_user_data = false
use_custom_get_known_users = false

. But as i try to view the ticket page, i am getting an IntegrityError in the sqlite backend. As far as i could figure out, flexibleassignto plugin is trying to execute an SQL <EMAIL_SQL % (_username, _email)> which is bad as pointed in

Python Traceback

File "/Library/Python/2.6/site-packages/Trac-0.12.3dev_r10921-py2.6.egg/trac/web/", line 522, in _dispatch_request
File "/Library/Python/2.6/site-packages/Trac-0.12.3dev_r10921-py2.6.egg/trac/web/", line 254, in dispatch
  self._post_process_request(req, *resp)
File "/Library/Python/2.6/site-packages/Trac-0.12.3dev_r10921-py2.6.egg/trac/web/", line 363, in _post_process_request
  resp = f.post_process_request(req, *resp)
File "/Library/Python/2.6/site-packages/FlexibleAssignTo-0.7.13-py2.6.egg/flexibleassignto/", line 167, in post_process_request
File "/Library/Python/2.6/site-packages/FlexibleAssignTo-0.7.13-py2.6.egg/flexibleassignto/", line 193, in _build_select
File "/Library/Python/2.6/site-packages/FlexibleAssignTo-0.7.13-py2.6.egg/flexibleassignto/", line 250, in _ensure_user_data
  cursor.execute(EMAIL_SQL % (_username, _email))
File "/Library/Python/2.6/site-packages/Trac-0.12.3dev_r10921-py2.6.egg/trac/db/", line 66, in execute
  return self.cursor.execute(sql)
File "/Library/Python/2.6/site-packages/Trac-0.12.3dev_r10921-py2.6.egg/trac/db/", line 78, in execute
  result = PyFormatCursor.execute(self, *args)
File "/Library/Python/2.6/site-packages/Trac-0.12.3dev_r10921-py2.6.egg/trac/db/", line 56, in execute
  args or [])
File "/Library/Python/2.6/site-packages/Trac-0.12.3dev_r10921-py2.6.egg/trac/db/", line 48, in _rollback_on_error
  return function(self, *args, **kwargs)

System Information

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7

Trac	0.12.3dev-r10921
Docutils	0.8
Genshi	0.6
Pygments	1.4
pysqlite	2.4.1
Python	2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)]
pytz	2011h
setuptools	0.6
SQLite	3.6.12
Subversion	1.6.16 (r1073529)
jQuery	1.4.4

Attachments (0)

Change History (5)

comment:1 in reply to:  description ; Changed 6 years ago by kailash.buki@…

Whoops the actual configuration settings was like this:

ensure_user_data = true
use_custom_get_known_users = true

comment:2 in reply to:  1 Changed 6 years ago by Morris

Replying to

Whoops the actual configuration settings was like this:

ensure_user_data = true
use_custom_get_known_users = true

Is that all the error output? The stack trace in the description doesn't show the IntegrityError..

comment:3 Changed 6 years ago by kailash.buki@…

The actual error was

Trac detected an internal error:
IntegrityError: columns sid, authenticated, name are not unique

I just posted the summary in my earlier post.

comment:4 Changed 6 years ago by Morris

Status: newassigned

I haven't had a chance to look at this yet - and I likely won't for some time :/ Still, it smells like a legitimate bug (or at least a tricky config problem), so if you want to dig into it and submit a patch for any bugs you find, I'll try to take a look and apply it when I can.

comment:5 Changed 10 months ago by Ryan J Ollos

Resolution: wontfix
Status: assignedclosed

The plugin is deprecated in Trac 1.3.2 and later. To customize the list of users that appear in the assign-to list, subclass ConfigurableTicketWorkflow and override the get_allowed_owners method.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Morris.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.