Opened 8 years ago

# Does not work for 'new' tickets

Reported by: Owned by: goldman gt4329b lowest FlexibleAssignToPlugin major 0.12

### Description

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

### comment:1 follow-up: ↓ 5 Changed 8 years ago by gt4329b

• Priority changed from normal to high
• Status changed from new to assigned

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 8 years ago by goldman

• Trac Release changed from 0.10 to 0.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 follow-up: ↓ 4 Changed 8 years ago by melanor9@…

• Severity changed from normal to major

### comment:4 in reply to: ↑ 3 Changed 7 years ago by anonymous

Any news on this? Cheers

### comment:5 in reply to: ↑ 1 ; follow-up: ↓ 7 Changed 6 years ago by jimbeau

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.

### comment:6 Changed 6 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 5 years ago by anonymous

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.

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 5 years ago by gt4329b

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

### comment:8 follow-up: ↓ 9 Changed 5 years ago by gt4329b

• Priority changed from high to lowest

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 5 years ago by mizraith

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 4 years ago by anonymous

• Trac Release changed from 0.11 to 0.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