Edgewall Software

Ticket #2662 (new enhancement)

Opened 2 years ago

Last modified 4 months ago

assign tickets to multiple users

Reported by: mala Owned by: jonas
Priority: normal Milestone: 0.12
Component: ticket system Version: 0.9.3
Severity: normal Keywords: tracobject user
Cc: software@…, mjhweb-trac-tickets@…, josh.moore@…, david.l.jones@…, gjcarneiro@…, r.s.hatcher@…, benton@…, phuna24@…, sarcastyx@…

Description

It would be very nice, if I could assign a ticket to more than one user. I set the restrict owner-parameter to false and typed in two users. I tried with different syntax, but the trac system did not notice the ticket to belong to the them. Would be fine...

Attachments

Change History

  Changed 2 years ago by cboos

  • keywords tracobject user added
  • milestone changed from 0.9.4 to 0.12

Some remarks:

  • the milestone:0.9.4 is used for bug fixes only
  • in general, the Trac ticket system can't really cope with multiple values for a field (multiple components, milestones, versions, etc.)
  • milestone:0.12 aims to have a better user/session system. This enhancement request seems to fit in this category.

  Changed 2 years ago by douard@…

I have the same need. Waiting for it to be properly implemented in Trac, here is my current hack:

  • add a new ticket report with the following SQL query (this is a very naive hack, that do not work if 2 users have similar usernames, eg. 'toto' and 'toto_jr' will interfer):
    SELECT p.value AS __color__,
       (CASE status WHEN 'assigned' THEN 'Assigned' ELSE 'Owned' END) AS __group__,
       id AS ticket, summary, component, version, milestone,
       t.type AS type, priority, time AS created,
       changetime AS _changetime, description AS _description,
       reporter AS _reporter
      FROM ticket t, enum p
      WHERE t.status IN ('new', 'assigned', 'reopened') 
    AND p.name = t.priority AND p.type = 'priority' AND owner glob '*$USER*' 
      ORDER BY (status = 'assigned') DESC, p.value, milestone, t.type, time
    
  • modified the Notify.py (from Trac 0.9.3) source code file, so the ticket notify system send a message to every owner of the component (must be separated with commas "," or white spaces): File $PYTHONPATH/site-packages/trac/Notify.py, line 286, replace:
                    recipients.append(row[2])
    

with:

                recipients.extend(row[2].replace(',', ' ').split())

  Changed 2 years ago by bpalmer

Thank you, previous commenter! I need this functionality for our new project, and it would have taken me hours to work out what you did, since I don't really know Python at all.

  Changed 2 years ago by anonymous

  • cc mjhweb-trac-tickets@… added

  Changed 2 years ago by anonymous

  • cc josh.moore@… added

  Changed 2 years ago by david.l.jones@…

  • cc david.l.jones@… added

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.

(SQLite docs)

So if the regexp could be implemented, then a "smarter" parsing of the owner field would look like

-- ...
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:

-- ...
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.

  Changed 18 months ago by Gustavo Carneiro

  • cc gjcarneiro@… added

  Changed 15 months ago by Rosalyn Hatcher

  • cc r.s.hatcher@… added

  Changed 15 months ago by anonymous

Has anyone implemented a hack to achieve this for Trac 0.10?

Adding a glob '*$USER*' to the report causes an error:

Report execution failed: not all arguments converted during string formatting

I don't know why this wouldn't work at 0.10, but does at 0.9.x

The ticket notification system has been rewritten and not knowing much python am finding it difficult to figure out what should be changed. Any help much appreciated.

  Changed 14 months ago by cboos

#4949 has been closed as duplicate.

A slight variant to this idea would be to have to possibility to use a group name for the owner. I thought this was proposed before, but couldn't find a reference to it...

  Changed 14 months ago by mala

I couldn't find the "original ticket" too. Close it, when you have found. I cannot see this is a duplicate.

  Changed 14 months ago by anonymous

Ah now I see it. Anyway I do want to specify any possible combination as a group. It would be fine to have the possibility to assign to more than one "real" users.

  Changed 11 months ago by anonymous

  • cc benton@… added

  Changed 10 months ago by anonymous

  • cc phuna24@… added

  Changed 9 months ago by andyg

This would certainly be a very useful feature for my organization. When the assign to field is restricted to a user list, it would be nice to be able to select multiple users from that list as well, as opposed to typing each in with some sort of delimiter.

follow-up: ↓ 17   Changed 9 months ago by anonymous

I have a need for this. Sometimes, team members are assigned to finish same kind of tasks but not a single group task. e.g. "read this license" or "install secure ware to your PC." Everyone has to do it by themselvs. So, I would issue a ticket having the same task description to every member. Currently, I must issue a number of tickets one by one.

I guess the problem of my needs is more related to UI, than DB.

in reply to: ↑ 16   Changed 9 months ago by anonymous

Replying to anonymous:

I have a need for this. Sometimes, team members are assigned to finish same kind of tasks but not a single group task. e.g. "read this license" or "install secure ware to your PC." Everyone has to do it by themselvs. So, I would issue a ticket having the same task description to every member. Currently, I must issue a number of tickets one by one. I guess the problem of my needs is more related to UI, than DB.

My opinion was probably not too clear.

I suppose "create a ticket using an existing ticket" functionality is good enough for me. I can even use ticket keyword to follow up tens of tickets.

  Changed 4 months ago by anonymous

  • cc sarcastyx@… added

Add/Change #2662 (assign tickets to multiple users)

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change. Next status will be 'new'
The owner will change to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.