Autotake, autoopen and the ordering of events

I’ve been looking at autotake from rt2 and trying to work out why I can’t
get it to work on rt3 for a reply submitted via the web interface (it
works fine via email)

As far as I can see the problem is that the status and owner fields of
Update.html get processed after the attachments (which presumably fire off
the relevant scrips) with the result that the ticket gets reassigned back
to Nobody and Open regardless of what scrips might set those values to in
the meantime.

Coping strategies I’m considering in order of complexity (and probably
desirability)

  1. Remove those fields from Update.html - they can be set in other ways.

  2. Reorder Update.html so that ProcessTicketBasics is called before the
    attachments are handled (but that may have other ill effects I cannot
    predict).

  3. Find some way for ProcessTicketBasics to know when a field it wants to
    change has changed between when the update was submitted and when it comes
    to set the value. Something of the lines of ‘set value to newvalue if
    value is still oldvalue, otherwise bail and moan that a scrip has been
    fiddling with value’.

Anyone else have any alternates I should consider?

Thanks

John

J. Sloan a écrit :

  1. Find some way for ProcessTicketBasics to know when a field it wants to
    change has changed between when the update was submitted and when it comes
    to set the value. Something of the lines of ‘set value to newvalue if
    value is still oldvalue, otherwise bail and moan that a scrip has been
    fiddling with value’.

I patched Update.html with this approach, considering only the “owner”
field when it was “Nobody” (as this is the only condition when an
“AutoTake” could take place).

Guillaume Perréal.

Responsable informatique,
Cemagref, groupement de Lyon,
France.

Tél: (+33) 4.72.20.87.87.
Fax: (+33) 4.78.47.78.75.
Site: http://www.lyon.cemagref.fr/