#2662: assign tickets to multiple users
-----------------------------+----------------------------------------------
Reporter: mala | Owner: jonas
Type: enhancement | Status: new
Priority: normal | Milestone: 0.12
Component: ticket system | Version: 0.9.3
Severity: normal | Resolution:
Keywords: tracobject user |
-----------------------------+----------------------------------------------
Changes (by [EMAIL PROTECTED]):
* cc: [EMAIL PROTECTED] (added)
Comment:
SQLite has some regexp capability, but it's not implemented (?). I'm not a
SQLite person, so I'm not sure how to use it, but here's the blurb:
The REGEXP operator is a special syntax for the regexp() user
function. No regexp() user function is defined by default and so use of
the REGEXP operator will normally result in an error message. If a user-
defined function named "regexp" is defined at run-time, that function will
be called in order to implement the REGEXP operator.
([http://www.sqlite.org/lang_expr.html SQLite docs])
So if the regexp could be implemented, then a "smarter" parsing of the
owner field would look like
{{{
#!sql
-- ...
AND p.name = t.priority AND p.type = 'priority' AND owner REGEXP
'([^,]*,)*$USER(,[^,]*)*'
-- ...
}}}
Of course, this depends on a user-provided regexp function in SQLite
(whatever that means... ;) ). Alternatively, simply make sure that the
field is padded left and right sides with commas, so then the glob looks
like this:
{{{
#!sql
-- ...
AND p.name = t.priority AND p.type = 'priority' AND owner GLOB '*,$USER,*'
-- ...
}}}
Of course, these are both hacks, and I don't condone using them, nor would
I take responibility for using them in combination with any other queries,
reports, database systems, prolonged sun exposure, narcotic pain killers,
etc.
--
Ticket URL: <http://projects.edgewall.com/trac/ticket/2662>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets