<div dir="ltr">Thank you! This seems to be doing the right thing, while still not notifying the user of the change. It's exactly what I was hoping for. It felt great to close the ticket my boss made on this issue back in November!<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 23, 2017 at 12:06 PM, Shawn M Moore <span dir="ltr"><<a href="mailto:shawn@bestpractical.com" target="_blank">shawn@bestpractical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hey Robert, Alex,<div><div><div><br></div><div><div><blockquote type="cite">Is this just a display bug or are we not using the proper method to change the owner of the Ticket?<br></blockquote><div><br></div>You're not using the proper method.</div><div><br><blockquote type="cite"># do the actual 'status update'<br>my ($status, $msg) = $self->TicketObj->_Set(Field => 'Owner', Value => $Actor, RecordTransaction => 0);<br></blockquote><br></div></div><div>Should instead be:</div><div><br></div><div>my ($status, $msg) = $self->TicketObj->SetOwner($<wbr>Actor);</div><div><br></div><blockquote type="cite"><div><div>What works: When user is first to correspond, Scrip executes and in Ticket view the Owner is set as expected.<br><br><br>What doesn’t work: If we go into the queue and list all the open tickets, the owner will be listed as “nobody” in this view, but if you open the ticket, there is an owner. If you change the owner to someone else and change it back, then it seems to fix this issue.<br></div></div></blockquote></div></div><div><br></div><div>The reason you need to use SetOwner is that the owner of a ticket is represented in two different database tables. The first is in the GroupMembers table, alongside Requestors, Ccs, and AdminCcs, and custom roles. This is what provides features like permissions. It's also what's used when you display the "Owner" column in search results. Tickets _also_ store their owner denormalized in the tickets table. This is used in, among other places, displaying the owner on ticket display, and in email notifications.</div><div><br></div><div>->Set(Field => 'Owner') only updates the latter. ->SetOwner updates both.</div><div><br></div><div>This explains the inconsistencies you're seeing. Please try switching your scrip to ->SetOwner and seeing if it helps for tickets going forward. For existing tickets with this problem, you'll need to address the consistency issue.</div><div><br></div><div>It turns out that, for different reasons entirely ( <a href="https://issues.bestpractical.com/Ticket/Display.html?id=32381" target="_blank">https://issues.bestpractical.<wbr>com/Ticket/Display.html?id=<wbr>32381</a> ), RT 4.4.2 adds an upgrade step and an rt-validator rule that detects and fixes such inconsistencies. You can find them here:</div><div><br></div><div><a href="https://github.com/bestpractical/rt/commit/58bacce6ada754657c7f56fd91f20c573108c1ab" target="_blank">https://github.com/<wbr>bestpractical/rt/commit/<wbr>58bacce6ada754657c7f56fd91f20c<wbr>573108c1ab</a></div><div><a href="https://github.com/bestpractical/rt/commit/20d8daf6855e3c53ee8a79d68271941d4cdca159" target="_blank">https://github.com/<wbr>bestpractical/rt/commit/<wbr>20d8daf6855e3c53ee8a79d6827194<wbr>1d4cdca159</a></div><div><br></div><div>Best,</div><div>Shawn</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div>Alex Hall<br></div>Automatic Distributors, IT department<br></div><a href="mailto:ahall@autodist.com" target="_blank">ahall@autodist.com</a><br></div></div>
</div>