Modify

Opened 17 years ago

Closed 8 years ago

#2634 closed defect (wontfix)

Does not work for 'new' tickets

Reported by: Peter Owned by: Morris
Priority: lowest Component: FlexibleAssignToPlugin
Severity: major Keywords:
Cc: Trac Release: 0.12

Description

Dropdown shows up when reassigning, but not for new tickets. Config issue perhaps?

Attachments (1)

ticket.html.newTicketOwnerToSelf.dev013-r10672.patch (1.4 KB) - added by Morris 14 years ago.
Patch against trunk 0.13 r10672 to default new tickets to the creating (and assumed logged in) user

Download all attachments as: .zip

Change History (12)

comment:1 Changed 17 years ago by Morris

Priority: normalhigh
Status: newassigned

Minor point of clarification: you're not actually trying to use FlexibleAssignTo with Trac 0.10.*, are you? I'm figuring that was just a ticket-entry oversight, but I want to be sure...

As far as the dropdown not showing up on new tickets: you're absolutely right. I hadn't noticed that until now as our Trac has been tweaked to short-circuit the "owner" field on the new ticket page to default to the currently logged-in user, as well as be non-editable. Because of that implementation tweak, made before FlexibleAssignTo was implemented, I never realized that FlexibleAssignTo doesn't work on the new ticket page. Although I'm not surprised it doesn't, given the way the template matching & code slipstreaming is written.

I'll take a look and see what can be done -- at the very least I can point you to the relevant section of code if you want to tackle it on your own.

comment:2 Changed 17 years ago by Peter

Trac Release: 0.100.11

Trac 0.11b1 here, sorry for the wrong info in initial submission. I wonder whether some sort of workflow hack could force Trac to execute set_owner operation on new tickets?

comment:3 Changed 17 years ago by melanor9@…

Severity: normalmajor

comment:4 in reply to:  3 Changed 15 years ago by anonymous

Any news on this? Cheers

comment:5 in reply to:  1 ; Changed 15 years ago by Jim Callahan

Replying to gt4329b:

I'll take a look and see what can be done -- at the very least I can point you to the relevant section of code if you want to tackle it on your own.

Any news on this?

If you just point me to the code, I can see what can be done.

jimbeau

comment:6 Changed 14 years ago by suran.jan@…

Hello i have this problem too. My version of trac is 0.11.4 is there any solution ?

comment:7 in reply to:  5 Changed 14 years ago by anonymous

Replying to jimbeau:

Replying to gt4329b:

I'll take a look and see what can be done -- at the very least I can point you to the relevant section of code if you want to tackle it on your own.

Any news on this?

If you just point me to the code, I can see what can be done.

jimbeau

You may set restrict_owner = true in your trac.ini but it will show only the 'cryptic' names in the initial assign-to (in new tickets) as without this plugin.

IMHO there is no way in 0.11 to fix the initial assign-field to show up in the same beautiness as in the re-assign-field as done by this plugin. You will be able to set option values but no option display values for the select-field ('assign to'-field in new tickets). Have a look in the method post_process_request() in flexibleassignto.py, add something like this to understand what I mean:

    def post_process_request(self, req, template, data, content_type):
        if not data or len(self.valid_owner_controllers) == 0:
            return template, data, content_type
        
        if 'fields' in data:
            fooFields = data.get('fields',[])
            for k in range(len(fooFields)):
                if (fooFields[k]['name'] == 'owner'):
                    fooOwner = fooFields[k]
                    fooOwner['type'] = 'select'
                    # no way here to set the display value?!
                    fooOwner['options'] = {'Foo', 'Bar', 'Baz'}

Maybe I am missing something and there is a proper solution, I have overseen. Let me/us know.

Dispite the fine work of gt4329b for this plugin there also is a patch for 0.11 which may be suitable for you http://trac.edgewall.org/ticket/7339.

HTH! regards, Marian

Changed 14 years ago by Morris

Patch against trunk 0.13 r10672 to default new tickets to the creating (and assumed logged in) user

comment:8 Changed 14 years ago by Morris

Priority: highlowest

Probably not going to get around to ever tackling this, as my company's use case is just to default new tickets to the ticket creator. Sorry :/

In case that use case works for you, the attached patch can be used to monkeypatch your (0.13dev-r10672 or later) ticket.html code to default to the current user - which is really only useful if only logged-in users can create tickets.

I'll leave this ticket open as I suspect that there might one day be other people who run into the same thing and think it's a new/unknown bug...

comment:9 in reply to:  8 Changed 13 years ago by Red

Replying to gt4329b:

I'll leave this ticket open as I suspect that there might one day be other people who run into the same thing and think it's a new/unknown bug...

Thank you for leaving it open! I actually just spent a day thinking that I had my installation incorrect for the FlexibleAssignTo plugin. I'm glad I came across this ticket, actually. I have the plugin working, I just had not fully created a ticket and checked the ticket to reassign to a new owner.

comment:10 Changed 12 years ago by anonymous

Trac Release: 0.110.12

using trac 0.12.4 plugin work only when modify ticket, but when i create a new ticket - there are only user logins at owner list, not full names

comment:11 Changed 8 years ago by Ryan J Ollos

Resolution: wontfix
Status: assignedclosed

The plugin is deprecated in Trac 1.3.2 and later. To customize the list of users that appear in the assign-to list, subclass ConfigurableTicketWorkflow and override the get_allowed_owners method.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Morris.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.