Re: BlockerBugsApp to AutoQA Trac?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2013-02-22 at 08:42 -0700, Tim Flink wrote:
> On Fri, 22 Feb 2013 07:29:58 -0800
> Adam Williamson <awilliam@xxxxxxxxxx> wrote:
> 
> > On Fri, 2013-02-22 at 08:16 -0700, Tim Flink wrote:
> > 
> > > I'm not sure that adding a new field for ticket submission is the
> > > best answer here. 
> > 
> > I'm not sure what you're referring to here. The defaultccplugin
> > solution I proposed doesn't do this.
> > 
> > What happens right now is we use a setting in trac that adds a given
> > address or set of addresses to the CC field on *every ticket*.
> > 
> > defaultccplugin allows us to set default CC per component rather than
> > universally. But the basic mechanism is the same in both cases: an
> > address is (can be) added to trac's public CC field at ticket creation
> > time. The plugin just lets us specify different addresses for
> > different components.
> 
> Yeah, but looking at the documentation for the plugin [1], it looks
> like a field for "default cc" is added to every ticket. It should be
> filled in already but it adds another field to the ticket. I could be
> mis-interpreting the page, though.

I wasn't able to test it as I don't have a test trac instance and
setting one up is kind of a pain, but just eyeballing the code, I don't
think that's actually how it works.

class TicketDefaultCC(Component):
    """Automatically adds a default CC list when new tickets are
created.
    
    Tickets are modified at the time of creation by adding the
component's 
    default CC list to the ticket's CC list.
    """

    implements(ITicketManipulator)

    def prepare_ticket(self, req, ticket, fields, actions):
        pass

    def validate_ticket(self, req, ticket):
        comp_default_cc = DefaultCC(self.env, ticket['component'])
        if comp_default_cc and comp_default_cc.cc:
            if ticket['cc']:
                ticket['cc'] += ', '
            ticket['cc'] += comp_default_cc.cc

        return []

So if I'm reading that comment and the code right, it really is just
adding a value to the ticket CC field.
-- 
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | identi.ca: adamwfedora
http://www.happyassassin.net

-- 
test mailing list
test@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe:
https://admin.fedoraproject.org/mailman/listinfo/test



[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]

  Powered by Linux