Ticket #2634 (assigned defect)

Opened 4 years ago

Last modified 9 months ago

Does not work for 'new' tickets

Reported by: goldman Assigned to: gt4329b (accepted)
Priority: lowest Component: FlexibleAssignToPlugin
Severity: major Keywords:
Cc: Trac Release: 0.11

Description

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

Attachments

ticket.html.newTicketOwnerToSelf.dev013-r10672.patch (1.4 kB) - added by gt4329b on 04/14/11 20:42:24.
Patch against trunk 0.13 r10672 to default new tickets to the creating (and assumed logged in) user

Change History

(follow-up: ↓ 5 ) 02/25/08 15:50:37 changed 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.

02/25/08 15:57:24 changed by goldman

  • 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?

(follow-up: ↓ 4 ) 05/07/08 17:32:58 changed by Melanor9@gmail.com

  • severity changed from normal to major.

(in reply to: ↑ 3 ) 05/31/09 16:46:43 changed by anonymous

Any news on this? Cheers

(in reply to: ↑ 1 ; follow-up: ↓ 7 ) 05/12/10 16:28:54 changed by 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

06/02/10 14:47:55 changed by suran.jan@pivopraha.cz

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

(in reply to: ↑ 5 ) 02/16/11 01:17:47 changed 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

04/14/11 20:42:24 changed by gt4329b

  • attachment ticket.html.newTicketOwnerToSelf.dev013-r10672.patch added.

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

(follow-up: ↓ 9 ) 04/14/11 20:46:44 changed 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...

(in reply to: ↑ 8 ) 08/22/11 23:38:29 changed by mizraith

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.


Add/Change #2634 (Does not work for 'new' tickets)




Change Properties
Action