Opened 18 months ago

Closed 18 months ago

Last modified 18 months ago

#13115 closed defect (fixed)

[PATCH] No autocompletion for assignee on creating a ticket

Reported by: skrattaren <skrattaren@…> Owned by: jomae
Priority: normal Component: AutocompleteUsersPlugin
Severity: normal Keywords:
Cc: Ryan J Ollos, Jun Omae Trac Release: 1.2


When creating a ticket in Trac 1.2, default workflow supports assigning ticket to a user right upon creation. This <input> field has another id (different from Trac 1.0), thus breaking owner autocompletion. Here's a quick'n'dirty patch:

  • autocompleteusers/htdocs/js/autocomplete_newticket.js

    diff --git a/autocompleteusers/htdocs/js/autocomplete_newticket.js b/autocompleteusers/htdocs/js/autocomplete_newticket.js
    index 32f2322..047f54e 100644
    a b  
    11jQuery(document).ready(function ($) {
    2   $("#field-owner").autocomplete("subjects", {
     2  $("#action_create_and_assign_reassign_owner").autocomplete("subjects", {
    33    formatItem: formatItem
    44  });

Attachments (0)

Change History (7)

comment:1 Changed 18 months ago by Jun Omae

The id and name attribute for owner field is depended on [ticket-workflow] settings. Also, your patch would break on Trac 1.0 or early.

-  $("#field-owner").autocomplete("subjects", {
+  $("#field-owner, #action [id$=_reassign_owner]").autocomplete("subjects", {

comment:2 Changed 18 months ago by Andrew Schulman

The patch seems to work fine. I'd say commit it.

comment:3 Changed 18 months ago by Andrew Schulman

That is, the patch in comment:1. It works all by itself, without the other change in the original post.

comment:4 Changed 18 months ago by skrattaren <skrattaren@…>

Yes, patch by Jun is obciously better, and I think is ready to be committed.

comment:5 Changed 18 months ago by Ryan J Ollos

Owner: changed from Tetsuya Morimoto to Ryan J Ollos
Status: newaccepted

comment:6 Changed 18 months ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 16480:

TracAutocompleteUsersPlugin 0.4.4dev: Fix autocomplete on newticket in Trac 1.2

Patch by Jun Omae.

Fixes #13115.

comment:7 Changed 18 months ago by Ryan J Ollos

Owner: changed from Ryan J Ollos to jomae

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain jomae.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.