News:

Looking for a good read? Check out the SimpleDesk Team Blog.

Main Menu

Topic solved
This topic is marked as solved and as such require no attention unless you want to bump this issue.

[Fixed] Reattribute tickets

Started by tfs, September 06, 2011, 01:07:35 AM

Previous topic - Next topic

tfs

There  needs to be a better way of reattributing a ticket from one user to another, without deleting the first user.  I have situations where a user leaves the college he works for, and his tickets need to go to someone else, but I don't want to delete the first guy... just reattribute his tickets to his co-worker.  The whole reattribution dialog is bad.

Another thing is that I want the ticket ownership to go to someone new, but the old replies on the ticket should still retain the name of the guy who wrote them in the first place.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Spoogs

There is an SMF mod that does close to what you want but for topics of course.. Arantor wrote it originally. It allowed changing the author of a post without the original author being deleted. I'm guessing this could be plugin territory as the current re-attribute maintenance function mirrors closely to what SMF does. The mod I mentioned would have to take the idea further to implement option as to change This ticket only, all tickets started by X, or all tickets and replies by X... and that should take care of it it.

tfs

There's definitely a place for a mod here.  If I give ownership of a ticket to Joe Smith who works at UCLA, and Joe has never met Bob Jones who used to work at UCLA and was the originator of the ticket, the replies on the ticket that were originally posted by Bob Jones should not look like they were posted by Joe Smith.  That makes it very confusing.  I'd like to just go to the ticket in question and reassign ownership.

Right now I can get away with doing it via SQL directly, though I haven't done it yet.  But it seems like just a matter of changing the ownership of the row in helpdesk_tickets, and perhaps the ownership of the original reply in helpdesk_ticket_replies.  Will report back here on how it looks after doing that.

I'd like a dialog in the ticket itself where I can reattribute ownership of the the ticket to a different user, but leave the replies on the ticket alone.  Of course with a very strong warning and "Are you sure" dialog that keeps it from being done by accident.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

tfs

I tried changing only helpdesk_tickets.id_member_started from one user to another.  There seems to be no problems.  Even editing the ticket seems to work OK.  Interestingly enough, editing the ticket by the new owner actually edits the hlepdesk_ticket_replies entry that still belongs to the old owner, but the system seems to be OK with that.  I wonder if maybe reattributing a ticket from one person to another wouldn't be better if it were to not just change helpdesk_tickets.id_member_started to the new userid, but also change the fields in the helpdesk_ticket_replies table for the first post in the ticket.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

cσσкιє мσηѕтєя

Quote from: tfs link=issue=790.com6640#com6640 date=1315356993I wonder if maybe reattributing a ticket from one person to another wouldn't be better if it were to not just change helpdesk_tickets.id_member_started to the new userid, but also change the fields in the helpdesk_ticket_replies table for the first post in the ticket.

Yes, that would be better indeed.

tfs

So let's say I want to change a ticket from "Test1 User" who has a userid of 129, to "Test2 User" who has a userid of 130.

I have just such a ticket here.  Ticket ID 1767, created by Test1 User.

in helpdesk_tickets

id_ticket = 1767
id_member_started = 129
id_first_msg = 12777

in helpdesk_ticket_replies

id_msg = 12777
id_member = 129
poster_name = Test1 User
poster_email = [email protected]
modified_member = 0
modified_name =

It's easy enough to change all of that via phpMyAdmin.  I like that better than moving ALL of the replies to the new user, because it looks just fine in the ticket to have the older messages attributed to the older user, and I don't really see any other ramifications.

Ideas for the UI of something that could do this automatically...

On Admin/Helpdesk/Maintenance, I'd envision a type of wizard interface.

[Reattribute Individual Ticket]

Enter the ticket number that you wish to reattribute...

Enter-> TICKET_NUMBER [NEXT]

After you enter the ticket number and press NEXT a dialog says...

Ticket 1767 was created by...

Username: Test1 User
UserID: 129

Reattribute this ticket to ->> USERNAME [NEXT]

There's also [n] additional replies on this ticket by Test1 User.  Do you also want to reattribute those [n] replies to Test2 User?  Yes/No (Checkboxes) [NEXT]

Reattribute Ticket 1767 (and n attached replies) from [Test1 User] to [Test2 User]?  YES/CANCEL
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

cσσкιє мσηѕтєя

It should be very simple to do, actually. Knowing Pete it's probably possible to do as a plugin quite easily. I may look at it some time, but I'm busy with another project.

tfs

Here's how I'm currently doing it for completely moving ALL tickets from one user to another...

First, I brought the tickets over from user 71 to user 256.

update sd_helpdesk_tickets set id_member_started = 256 WHERE id_member_started = 71


Then brought over ONLY the first replies.

update sd_helpdesk_ticket_replies
set id_member = 256, poster_name = 'John Smith', poster_email = '[email protected]'
where id_msg in (SELECT id_first_msg FROM `sd_helpdesk_tickets` where id_member_started = 256)


That way the other replies stay attributed to the original user, which makes more sense.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

SleePy

This has been implanted in    a60b187.

It does basically what tfs has mentioned above.  I used the reattribute section in the helpdesk and just added on the new option.
Jeremy D — Spare-Developer