You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by Apache Bloodhound <bl...@incubator.apache.org> on 2012/04/03 19:27:26 UTC
[Apache Bloodhound] #23: quick ticket functionality should check
that the ticket module is active
#23: quick ticket functionality should check that the ticket module is active
-----------------------+-------------------------------------
Reporter: gjm | Owner: gjm
Type: defect | Status: new
Priority: major | Milestone: RC1 for initial release
Component: dashboard | Version:
Keywords: |
-----------------------+-------------------------------------
We don't want to fail if the ticket module is turned off
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/23>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #23: quick ticket should check for correct
ticket module to use
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#23: quick ticket should check for correct ticket module to use
------------------------+-------------------------------------
Reporter: gjm | Owner: gjm
Type: defect | Status: closed
Priority: major | Milestone: RC1 for initial release
Component: dashboard | Version:
Resolution: fixed | Keywords:
------------------------+-------------------------------------
Comment (by olemis):
[/attachment/ticket/23/t23_r1328689_flexible_qct.diff URL for attached
patch] .
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/23#comment:10>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #23: quick ticket should check for correct
ticket module to use (was: quick ticket functionality should check
that the ticket module is active)
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#23: quick ticket should check for correct ticket module to use
------------------------+-------------------------------------
Reporter: gjm | Owner: gjm
Type: defect | Status: new
Priority: major | Milestone: RC1 for initial release
Component: dashboard | Version:
Resolution: | Keywords:
------------------------+-------------------------------------
Description changed by gjm:
Old description:
> We don't want to fail if the ticket module is turned off
New description:
We should be able to determine the active ticket module so that we can be
using it to pick up the correct fields and any other associated changes in
behaviour.
--
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/23#comment:3>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #23: quick ticket should check for correct
ticket module to use
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#23: quick ticket should check for correct ticket module to use
------------------------+-------------------------------------
Reporter: gjm | Owner: gjm
Type: defect | Status: closed
Priority: major | Milestone: RC1 for initial release
Component: dashboard | Version:
Resolution: fixed | Keywords:
------------------------+-------------------------------------
Changes (by gjm):
* status: reopened => closed
* resolution: => fixed
Comment:
Replying to [comment:14 olemis]:
> Please I'd suggest you to consider to continue the discussion in this
ticket .
Sorry to ignore that request but, unless there is an actual error in the
implementation, there is nothing strictly to fix. I have raised a new
ticket (#47) for continued discussion and it links back to here.
I strongly recommend leaving #47 for later.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/23#comment:15>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #23: quick ticket functionality should
check that the ticket module is active
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#23: quick ticket functionality should check that the ticket module is active
------------------------+-------------------------------------
Reporter: gjm | Owner: gjm
Type: defect | Status: new
Priority: major | Milestone: RC1 for initial release
Component: dashboard | Version:
Resolution: | Keywords:
------------------------+-------------------------------------
Changes (by olemis):
* cc: olemis+bh@… (added)
Comment:
sorry it's not clear to me what needs to be done exactly .
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/23#comment:1>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #23: quick ticket functionality should
check that the ticket module is active
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#23: quick ticket functionality should check that the ticket module is active
------------------------+-------------------------------------
Reporter: gjm | Owner: gjm
Type: defect | Status: new
Priority: major | Milestone: RC1 for initial release
Component: dashboard | Version:
Resolution: | Keywords:
------------------------+-------------------------------------
Comment (by gjm):
In the absence of a simpler check, I was thinking of adding these
functions to the theme.py:
{{{
#!python
def subclasses(cls):
"""recursively get subclasses of a class"""
for sub in cls.__subclasses__():
for subsub in subclasses(sub):
yield subsub
yield sub
def get_enabled_component_subclass(env, cls):
"""if the cls is not enabled, attempts to find a subclass which is"""
if env.is_component_enabled(cls):
return cls
for subcls in subclasses(cls):
if env.is_component_enabled(subcls):
return subcls
return None
}}}
then, in the {{{post_process_request}}} method, check for the subclasses
of tickets:
{{{
#!python
tmcls = get_enabled_component_subclass(self.env, TicketModule)
if tmcls is None:
tmcls = TicketModule
tm = tmcls(self.env)
}}}
Other suggestions would be welcome though.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/23#comment:2>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #23: quick ticket should check for correct
ticket module to use
Posted by Gary <ga...@wandisco.com>.
There is also a bit of conversation in
https://issues.apache.org/bloodhound/ticket/23 which might be useful to
talk about here too.
Cheers,
Gary
On 15/04/12 20:09, Apache Bloodhound wrote:
> #23: quick ticket should check for correct ticket module to use
> ------------------------+-------------------------------------
> Reporter: gjm | Owner: gjm
> Type: defect | Status: new
> Priority: major | Milestone: RC1 for initial release
> Component: dashboard | Version:
> Resolution: | Keywords:
> ------------------------+-------------------------------------
>
> Comment (by gjm):
>
> I can't see any particular problem with subclassing a component,
> particularly in the case where the parent class is meant to be deactivated
> to when the subclass is active.
>
> Meanwhile, I don't want to be attempting to find out what component is
> associated with the /newticket path if we do not know that this is always
> the correct path. I may misunderstand what is possible here of course.
>
> A simple alternative to my suggestion in comment:2 would be to see if
> Bloodhound's replacement !TicketModule is installed and active before
> checking on the original !TicketModule.
>
Re: [Apache Bloodhound] #23: quick ticket should check for correct
ticket module to use
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#23: quick ticket should check for correct ticket module to use
------------------------+-------------------------------------
Reporter: gjm | Owner: gjm
Type: defect | Status: new
Priority: major | Milestone: RC1 for initial release
Component: dashboard | Version:
Resolution: | Keywords:
------------------------+-------------------------------------
Comment (by gjm):
I can't see any particular problem with subclassing a component,
particularly in the case where the parent class is meant to be deactivated
to when the subclass is active.
Meanwhile, I don't want to be attempting to find out what component is
associated with the /newticket path if we do not know that this is always
the correct path. I may misunderstand what is possible here of course.
A simple alternative to my suggestion in comment:2 would be to see if
Bloodhound's replacement !TicketModule is installed and active before
checking on the original !TicketModule.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/23#comment:6>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #23: quick ticket should check for correct
ticket module to use
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#23: quick ticket should check for correct ticket module to use
------------------------+-------------------------------------
Reporter: gjm | Owner: gjm
Type: defect | Status: accepted
Priority: major | Milestone: RC1 for initial release
Component: dashboard | Version:
Resolution: | Keywords:
------------------------+-------------------------------------
Changes (by gjm):
* status: new => accepted
Comment:
OK, I think it is about time that the quick ticket functionality worked
with the product system so I'll take this on now.
I'll go with the relatively simple check in my last comment but I'll try
to throw in changes to the html to get the product field active and
conditionally show the Create Ticket button.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/23#comment:7>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #23: quick ticket should check for correct
ticket module to use
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#23: quick ticket should check for correct ticket module to use
------------------------+-------------------------------------
Reporter: gjm | Owner: gjm
Type: defect | Status: closed
Priority: major | Milestone: RC1 for initial release
Component: dashboard | Version:
Resolution: fixed | Keywords:
------------------------+-------------------------------------
Comment (by gjm):
See also #48 which has been raised as a suggestion to add the enhancements
suggested in comment:9
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/23#comment:16>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #23: quick ticket should check for correct
ticket module to use
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#23: quick ticket should check for correct ticket module to use
------------------------+-------------------------------------
Reporter: gjm | Owner: gjm
Type: defect | Status: new
Priority: major | Milestone: RC1 for initial release
Component: dashboard | Version:
Resolution: | Keywords:
------------------------+-------------------------------------
Comment (by olemis):
hmmm ... IMO what should be done is to iterate over instances of
`IRequestHandler` and determine which one matches /newticket path
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/23#comment:4>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #23: quick ticket should check for correct
ticket module to use
Posted by Gary <ga...@wandisco.com>.
Hi,
Hopefully the quick ticket functionality is working well enough for now.
I suspect that we will still need to tweak some of the behaviour but it
is nice for it to be linked up now.
The patches referred to in the ticket are:
* r1329220:
http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py?rev=1329220&r1=1329219&r2=1329220&view=diff
* r1329223:
http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html?rev=1329223&r1=1329222&r2=1329223&view=diff
Cheers,
Gary
On 04/23/2012 02:09 PM, Apache Bloodhound wrote:
> #23: quick ticket should check for correct ticket module to use
> ------------------------+-------------------------------------
> Reporter: gjm | Owner: gjm
> Type: defect | Status: closed
> Priority: major | Milestone: RC1 for initial release
> Component: dashboard | Version:
> Resolution: fixed | Keywords:
> ------------------------+-------------------------------------
> Changes (by gjm):
>
> * status: accepted => closed
> * resolution: => fixed
>
>
> Comment:
>
> r1329220 adds a method to check for appropriate ticketmodule. Also turns
> off functionality if either both ticketmodule candidate classes are active
> or both deactivated.
>
> r1329223 shows a product field in quickticket form on condition that the
> product field is available.
>
Re: [Apache Bloodhound] #23: quick ticket should check for correct
ticket module to use
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#23: quick ticket should check for correct ticket module to use
------------------------+-------------------------------------
Reporter: gjm | Owner: gjm
Type: defect | Status: closed
Priority: major | Milestone: RC1 for initial release
Component: dashboard | Version:
Resolution: fixed | Keywords:
------------------------+-------------------------------------
Changes (by gjm):
* status: accepted => closed
* resolution: => fixed
Comment:
r1329220 adds a method to check for appropriate ticketmodule. Also turns
off functionality if either both ticketmodule candidate classes are active
or both deactivated.
r1329223 shows a product field in quickticket form on condition that the
product field is available.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/23#comment:8>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #23: quick ticket should check for correct
ticket module to use
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#23: quick ticket should check for correct ticket module to use
------------------------+-------------------------------------
Reporter: gjm | Owner: gjm
Type: defect | Status: closed
Priority: major | Milestone: RC1 for initial release
Component: dashboard | Version:
Resolution: fixed | Keywords:
------------------------+-------------------------------------
Comment (by olemis):
Sorry for the delay but it wasn't until now that I could get this done . I
had to solve critical issues related to #39 first ''':-/''' .
[attachment:t23_r1328689_flexible_qct.diff Attached patch] is built on
top of [attachment:ticket:39:t39_r1328689_indexerror.diff other patch
submitted for #39] , hence you'll need to apply that one in first place .
Recall it's built on top of r1328689 . New features are :
- Extension point interface `IQuickCreateTicketBackend` .
- `DefaultQuickCreateTicketBackend` component implementing the former
so as to provide a simple way to create tickets by using Trac
built-in components. Used by default in case no other choice
is configured in ''trac.ini''
- `ExtensionOption` property used to select active backend.
It's not meant to replace your previous implementation but to make the
solution flexible and configurable by using Trac built-in mechanisms. The
idea is :
- Implement a similar backend in multi-product plugin
(i.e. reuse your previous code ''';)''' .
- Make the installer to set related config option in ''trac.ini''
so as to use multi-product backend since the beginning.
Nonetheless I'll review your implementation in order to determine whether
further enhancements may be needed so as to make some room for features
committed recently.
'''TODO''': Maybe it'd be nice to research whether this can be done using
ticket change listeners or any other similar existing mechanism.
'''PS''' : feel free to reopen the ticket if appropriate . We could also
open a separate ticket to discuss and work on these enhancements ''';)'''
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/23#comment:9>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #23: quick ticket should check for correct
ticket module to use
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#23: quick ticket should check for correct ticket module to use
------------------------+-------------------------------------
Reporter: gjm | Owner: gjm
Type: defect | Status: new
Priority: major | Milestone: RC1 for initial release
Component: dashboard | Version:
Resolution: | Keywords:
------------------------+-------------------------------------
Comment (by olemis):
Besides it's not recommended to subclass components unless `abstract=True`
is set in class suite.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/23#comment:5>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #23: quick ticket should check for correct
ticket module to use
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#23: quick ticket should check for correct ticket module to use
------------------------+-------------------------------------
Reporter: gjm | Owner: gjm
Type: defect | Status: reopened
Priority: major | Milestone: RC1 for initial release
Component: dashboard | Version:
Resolution: | Keywords:
------------------------+-------------------------------------
Comment (by gjm):
Now I look at this again I think I misinterpreted it a little. The patch
appears to avoid the error by not checking that the {{{TicketModule}}} is
active at all. This leaves us using the wrong ticket module and so I see
no advantage in that respect.
As such, I believe any further enhancement that this brings should really
be discussed in a new ticket.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/23#comment:13>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #23: quick ticket should check for correct
ticket module to use
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#23: quick ticket should check for correct ticket module to use
------------------------+-------------------------------------
Reporter: gjm | Owner: gjm
Type: defect | Status: reopened
Priority: major | Milestone: RC1 for initial release
Component: dashboard | Version:
Resolution: | Keywords:
------------------------+-------------------------------------
Changes (by gjm):
* status: closed => reopened
* resolution: fixed =>
Comment:
Not sure I understand when you say it is not meant to replace the previous
implementation but I will check it out.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/23#comment:11>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #23: quick ticket should check for correct
ticket module to use
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#23: quick ticket should check for correct ticket module to use
------------------------+-------------------------------------
Reporter: gjm | Owner: gjm
Type: defect | Status: reopened
Priority: major | Milestone: RC1 for initial release
Component: dashboard | Version:
Resolution: | Keywords:
------------------------+-------------------------------------
Comment (by gjm):
OK, I see that this is an alternative fix now as it effectively replaces
the requirement to find the right {{{TicketModule}}} with getting the
{{{TicketSystem}}}. That looks fine.
At the moment, the only other comment I would have is that is traditional
in Trac to define interface methods without the self argument. Assuming
that everyone is happy with this change, I'll just drop the {{{self}}}
from the {{{IQuickCreateTicketBackend.create}}} method.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/23#comment:12>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #23: quick ticket should check for correct
ticket module to use
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#23: quick ticket should check for correct ticket module to use
------------------------+-------------------------------------
Reporter: gjm | Owner: gjm
Type: defect | Status: reopened
Priority: major | Milestone: RC1 for initial release
Component: dashboard | Version:
Resolution: | Keywords:
------------------------+-------------------------------------
Comment (by olemis):
Replying to [comment:13 gjm]:
> Now I look at this again I think I misinterpreted it a little. The patch
appears to avoid the error by not checking that the {{{TicketModule}}} is
active at all. This leaves us using the wrong ticket module and so I see
no advantage in that respect.
>
I've reviewed all this ... and maybe I didn't get the idea behind all this
in first place . I'm working on a new patch . It should be ready tomorrow
.
> As such, I believe any further enhancement that this brings should
really be discussed in a new ticket.
Please I'd suggest you to consider to continue the discussion in this
ticket .
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/23#comment:14>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker