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 <de...@bloodhound.apache.org> on 2013/07/17 17:34:25 UTC
[Apache Bloodhound] #596: pagination on /dashboard confused
#596: pagination on /dashboard confused
---------------------+---------------
Reporter: tim | Owner:
Type: defect | Status: new
Priority: major | Version:
Resolution: |
---------------------+---------------
When viewing the product-less url of /dashboard the page number links
result in a search for tickets of the default product. However, that page
shows a list of all product tickets so you'd expect to get later pages of
that same list.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/596>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #596: pagination on /dashboard confused
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#596: pagination on /dashboard confused
------------------------+--------------------
Reporter: tim | Owner: nobody
Type: defect | Status: new
Priority: major | Milestone:
Component: dashboard | Version:
Resolution: | Keywords:
------------------------+--------------------
Comment (by tim):
This is the current situation in 0.6
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/596#comment:3>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #596: pagination on /dashboard confused
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#596: pagination on /dashboard confused
------------------------+--------------------
Reporter: tim | Owner: nobody
Type: defect | Status: new
Priority: major | Milestone:
Component: dashboard | Version: 0.6.0
Resolution: | Keywords:
------------------------+--------------------
Changes (by tim):
* version: => 0.6.0
Old description:
> When viewing the product-less url of /dashboard the page number links
> result in a search for tickets of the default product. However, that
> page shows a list of all product tickets so you'd expect to get later
> pages of that same list.
New description:
When viewing the product-less url of /dashboard the page number links
result in a search for tickets of the default product. However, that page
shows a list of all product tickets so you'd expect to get later pages of
that same list.
Further clarification
------------------------
What seems to work correctly:
A url such as "/products/mainserver/dashboard" shows all the tickets for
the product "mainserver". If there are further pages a search is
initiated and shows that page of "mainserver" tickets.
What doesn't seem to work correctly:
A url such as "/dashboard" shows all the tickets for '''all''' products.
If there are further pages a search is initiated and you'd think it would
show that page of '''all product''' tickets, but it doesn't. It instead
does a search based on the default product and only shows tickets
associated with that.
Further, you may notice that the breadcrumbs show "Dashboard / Default"
and think you maybe able to correct it by selecting the product default
and selecting "All Products". However, that only takes you to
"/products".
This probably leads into a further issue of there being no apparent way of
doing a search across all products.
--
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/596#comment:5>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #596: pagination on /dashboard confused
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#596: pagination on /dashboard confused
------------------------+--------------------------
Reporter: tim | Owner: matevzb
Type: defect | Status: assigned
Priority: major | Milestone:
Component: dashboard | Version: 0.6.0
Resolution: | Keywords: ticket query
------------------------+--------------------------
Changes (by olemis):
* owner: olemis => matevzb
* keywords: => ticket query
* status: review => assigned
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/596#comment:11>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #596: pagination on /dashboard confused
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#596: pagination on /dashboard confused
------------------------+----------------------
Reporter: tim | Owner: olemis
Type: defect | Status: accepted
Priority: major | Milestone:
Component: dashboard | Version: 0.6.0
Resolution: | Keywords:
------------------------+----------------------
Changes (by olemis):
* owner: nobody => olemis
* status: new => accepted
Comment:
Replying to [ticket:596 tim]:
>
[...]
> Further clarification
[...]
>
> What doesn't seem to work correctly:
> A url such as "/dashboard" shows all the tickets for '''all''' products.
If there are further pages a search is initiated and you'd think it would
show that page of '''all product''' tickets, but it doesn't. It instead
does a search based on the default product and only shows tickets
associated with that.
When I read this part I wanted to say I wanted to say «default product
will be phased out soon, that should should solved the issue» ... but that
not the whole truth, just part of the situation. Taken blood-hound.net as
a reference, in there the concept of default product does not exist , and
still atm [http://blood-hound.net/dashboard global dashboard] shows
tickets for products `swlcu` and `dataviz` whereas ''More'' and pagination
links return an [http://blood-
hound.net/query?status=!closed&group=product&col=id&col=summary&col=owner&col=status&col=priority&col=milestone&order=priority
empty result set].
So, there's work to do even after.
> Further, you may notice that the breadcrumbs show "Dashboard / Default"
and think you maybe able to correct it by selecting the product default
and selecting "All Products". However, that only takes you to
"/products".
This will be gone once the notion of default product will be removed. See
[http://blood-
hound.net/query?status=!closed&product=dataviz&groupdesc=1&group=time&order=priority&col=id&col=summary&col=owner&col=status&col=priority&desc=1
this query] , even if does not work as explained above the query is
executed in global scope.
> This probably leads into a further issue of there being no apparent way
of doing a search across all products.
From a developer perspective the fact that the widget shows results
indicates that it's possible to retrieve such result sets (same code used
in the end) . The fact is that /query request handler seems not to be
relying upon `ProductTicketQuery` class ... or if it is there's something
wrong.
I'll take a look .
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/596#comment:6>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #596: pagination on /dashboard confused
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#596: pagination on /dashboard confused
------------------------+--------------------------
Reporter: tim | Owner: olemis
Type: defect | Status: assigned
Priority: major | Milestone:
Component: dashboard | Version: 0.6.0
Resolution: | Keywords: ticket query
------------------------+--------------------------
Comment (by matevzb):
Replying to [comment:13 olemis]:
> Replying to [comment:12 matevzb]:
> > I couldn't reproduce above issues, but do you perhaps have any tickets
in the database without associated products?
>
> Now I notice . I do recall the convention of using `product = ''` for
global (environment) resources.
>
> > If so, is this deliberate?
>
> Yes . Recall that I've never used default product in production, just
for (automated) functional testing purposes . I've also performed (manual)
tests for different features without having default products setup ,
because that's the way I always run BH .
>
> > (As far as I understood the multiproduct implementation, each ticket
should be associated to a product, otherwise we won't be able to perform
global and scoped queries, searches etc. Or maybe we could, but with lots
of problems.)
>
> I've not detected major problems until recently . I do not see why we
should be breaking it either now and, considering the error messages, it
seems to be just a matter of associating `product=''` with the global
environment .
>
> I'll take a look and propose a patch for you to review .
Please check if r1513085 solves the above issues. At least the first one
should be resolved, I'm not sure about the latter (still can't reproduce
the errors).
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/596#comment:14>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #596: pagination on /dashboard confused
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#596: pagination on /dashboard confused
------------------------+--------------------------
Reporter: tim | Owner: matevzb
Type: defect | Status: review
Priority: major | Milestone:
Component: dashboard | Version: 0.6.0
Resolution: | Keywords: ticket query
------------------------+--------------------------
Changes (by olemis):
* status: assigned => review
* owner: olemis => matevzb
Comment:
Replying to [comment:14 matevzb]:
[...]
>
> Please check if r1513085 solves the above issues. At least the first one
should be resolved, I'm not sure about the latter (still can't reproduce
the errors).
It's working now . Nevertheless I'd like to propose this tiny patch for
your consideration ...
{{{#!diff
diff -r 53b8c8a20bdb bloodhound_multiproduct/multiproduct/ticket/batch.py
--- a/bloodhound_multiproduct/multiproduct/ticket/batch.py Tue Aug 13
03:48:27 2013 +0000
+++ b/bloodhound_multiproduct/multiproduct/ticket/batch.py Tue Aug 13
11:20:27 2013 -0500
@@ -38,11 +38,13 @@
data['action_controls'] = []
global_env = ProductEnvironment.lookup_global_env(self.env)
- tmpenv = self.env
+ cache = {}
for k,v in tickets_by_product.iteritems():
- self.env = ProductEnvironment(global_env, k) if k else
global_env
- data['action_controls'] += self._get_action_controls(req, v)
- self.env = tmpenv
+ batchmdl = cache.get(k or '')
+ if batchmdl is None:
+ env = ProductEnvironment(global_env, k) if k else
global_env
+ cache[k] = batchmdl = ProductBatchModifyModule(env)
+ data['action_controls'] += batchmdl._get_action_controls(req,
v)
batch_list_modes = [
{'name': _("add"), 'value': "+"},
{'name': _("remove"), 'value': "-"},
}}}
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/596#comment:15>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #596: pagination on /dashboard confused
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#596: pagination on /dashboard confused
------------------------+----------------------
Reporter: tim | Owner: matevzb
Type: defect | Status: assigned
Priority: major | Milestone:
Component: dashboard | Version: 0.6.0
Resolution: | Keywords:
------------------------+----------------------
Changes (by matevzb):
* owner: olemis => matevzb
* status: accepted => assigned
Comment:
I'll try to fix this one if that's okay. It seems that there are a couple
of fixes needed for this, the first one being current /query redirection
to the default product.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/596#comment:7>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #596: pagination on /dashboard confused
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#596: pagination on /dashboard confused
------------------------+--------------------
Reporter: tim | Owner: olemis
Type: defect | Status: review
Priority: major | Milestone:
Component: dashboard | Version: 0.6.0
Resolution: | Keywords:
------------------------+--------------------
Changes (by matevzb):
* status: assigned => review
* owner: matevzb => olemis
Comment:
Fixed in r1511771. Still not perfect, but global and scoped queries now
return correct results. Product queries now return an extra 'product'
column in all scopes, so trac tests were adjusted as well. This will
likely be reverted for 1.0, once we fix the 'default product' issues.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/596#comment:9>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #596: pagination on /dashboard confused
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#596: pagination on /dashboard confused
------------------------+--------------------------
Reporter: tim | Owner: matevzb
Type: defect | Status: closed
Priority: major | Milestone:
Component: dashboard | Version: 0.6.0
Resolution: fixed | Keywords: ticket query
------------------------+--------------------------
Changes (by matevzb):
* status: review => closed
* resolution: => fixed
Comment:
All tests (functional/unit + manual) pass, committed in r1513765, closing
as fixed.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/596#comment:17>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #596: pagination on /dashboard confused
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#596: pagination on /dashboard confused
------------------------+--------------------------
Reporter: tim | Owner: olemis
Type: defect | Status: assigned
Priority: major | Milestone:
Component: dashboard | Version: 0.6.0
Resolution: | Keywords: ticket query
------------------------+--------------------------
Changes (by olemis):
* status: needinfo => assigned
Comment:
Replying to [comment:12 matevzb]:
> I couldn't reproduce above issues, but do you perhaps have any tickets
in the database without associated products?
Now I notice . I do recall the convention of using `product = ''` for
global (environment) resources.
> If so, is this deliberate?
Yes . Recall that I've never used default product in production, just for
(automated) functional testing purposes . I've also performed (manual)
tests for different features without having default products setup ,
because that's the way I always run BH .
> (As far as I understood the multiproduct implementation, each ticket
should be associated to a product, otherwise we won't be able to perform
global and scoped queries, searches etc. Or maybe we could, but with lots
of problems.)
I've not detected major problems until recently . I do not see why we
should be breaking it either now and, considering the error messages, it
seems to be just a matter of associating `product=''` with the global
environment .
I'll take a look and propose a patch for you to review .
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/596#comment:13>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #596: pagination on /dashboard confused
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#596: pagination on /dashboard confused
------------------------+--------------------
Reporter: tim | Owner: nobody
Type: defect | Status: new
Priority: major | Milestone:
Component: dashboard | Version:
Resolution: | Keywords:
------------------------+--------------------
Comment (by olemis):
Replying to [comment:3 tim]:
> This is the current situation in 0.6
I'll clarify my previous comment because I'm not sure I understand it
myself .
In previous versions pagination links worked as expected . The query
showed the same number of ticket included in the widget and therefore
there was a match in the result sets for each link. With time it was
changed, afaicr based on user's request ^citation needed^
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/596#comment:4>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #596: pagination on /dashboard confused
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#596: pagination on /dashboard confused
------------------------+--------------------
Reporter: tim | Owner: nobody
Type: defect | Status: new
Priority: major | Milestone:
Component: dashboard | Version:
Resolution: | Keywords:
------------------------+--------------------
Changes (by tim):
* owner: => nobody
* component: => dashboard
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/596#comment:1>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #596: pagination on /dashboard confused
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#596: pagination on /dashboard confused
------------------------+--------------------------
Reporter: tim | Owner: matevzb
Type: defect | Status: closed
Priority: major | Milestone: Release 7
Component: dashboard | Version: 0.6.0
Resolution: fixed | Keywords: ticket query
------------------------+--------------------------
Changes (by rjollos):
* milestone: => Release 7
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/596#comment:18>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #596: pagination on /dashboard confused
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#596: pagination on /dashboard confused
------------------------+--------------------
Reporter: tim | Owner: nobody
Type: defect | Status: new
Priority: major | Milestone:
Component: dashboard | Version:
Resolution: | Keywords:
------------------------+--------------------
Comment (by olemis):
Replying to [ticket:596 tim]:
> When viewing the product-less url of /dashboard the page number links
result in a search for tickets of the default product. However, that page
shows a list of all product tickets so you'd expect to get later pages of
that same list.
This used to be the case in previous versions of Bloodhound but was
changed afaicr on user's request ^citation needed^
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/596#comment:2>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #596: pagination on /dashboard confused
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#596: pagination on /dashboard confused
------------------------+----------------------
Reporter: tim | Owner: matevzb
Type: defect | Status: assigned
Priority: major | Milestone:
Component: dashboard | Version: 0.6.0
Resolution: | Keywords:
------------------------+----------------------
Comment (by olemis):
Replying to [comment:7 matevzb]:
> I'll try to fix this one if that's okay. It seems that there are a
couple of fixes needed for this,
ok , I'm just busy with the functional test suite now .
> the first one being current /query redirection to the default product.
seems so , but afaiu the most relevant enahancement consists in supporting
queries spanning across multiple products in /query UI . I'm sure that
will be second or third one in your TODO list ;)
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/596#comment:8>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #596: pagination on /dashboard confused
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#596: pagination on /dashboard confused
------------------------+--------------------
Reporter: tim | Owner: olemis
Type: defect | Status: review
Priority: major | Milestone:
Component: dashboard | Version: 0.6.0
Resolution: | Keywords:
------------------------+--------------------
Comment (by olemis):
I've noticed widget errors in global dashboard. Bloodhound @ r1511771
reports the following errors after trying to render the global dashboard .
[[Image(bh_mp_x_128_widget_errors.png)]]
The one at the top is
[[span(Log entry, class=label label-important)]]
{{{
2013-08-10 23:18:24,012 Trac[web_ui] ERROR: - fb7227d2-f5be-
40d3-95f8-a483b76a3195 - Error rendering widget TicketQuery with options
{'args': {'max': 10, 'query':
'status=!closed&group=product&col=id&col=summary&col=owner&col=status&col=priority&order=priority&col=milestone&owner=$USER&',
'title': 'My Tickets'}}
}}}
[[span(Traceback, class=label label-important)]]
{{{#!py
Traceback (most recent call last):
File "/path/to/bloodhound/bloodhound_dashboard/bhdashboard/web_ui.py",
line 269, in _render_widget
return wp.render_widget(name, ctx, options)
File "/path/to/bloodhound/bloodhound_dashboard/bhdashboard/util.py",
line 132, in widget_name_checker
return f(self, name, *args, **kwargs)
File
"/path/to/bloodhound/bloodhound_dashboard/bhdashboard/widgets/query.py",
line 100, in render_widget
data = qrymdl.process_request(fakereq, self.env)[1]
File
"/path/to/bloodhound/bloodhound_multiproduct/multiproduct/ticket/query.py",
line 164, in process_request
result = super(ProductQueryModule, self).process_request(req)
File "/path/to/bloodhound/trac/trac/ticket/query.py", line 968, in
process_request
return self.display_html(req, query)
File "/path/to/bloodhound/trac/trac/ticket/query.py", line 1116, in
display_html
self.env[BatchModifyModule].add_template_data(req, data, tickets)
File
"/path/to/bloodhound/bloodhound_multiproduct/multiproduct/ticket/batch.py",
line 11, in add_template_data
req, data, tickets)
File "/path/to/bloodhound/trac/trac/ticket/batch.py", line 93, in
add_template_data
data['action_controls'] = self._get_action_controls(req, tickets)
File "/path/to/bloodhound/trac/trac/ticket/batch.py", line 113, in
_get_action_controls
ticket = Ticket(self.env, t['id'])
File "/path/to/bloodhound/trac/trac/ticket/model.py", line 82, in
__init__
self._fetch_ticket(tkt_id)
File "/path/to/bloodhound/trac/trac/ticket/model.py", line 121, in
_fetch_ticket
id=tkt_id), _("Invalid ticket number"))
ResourceNotFound: Ticket 2 does not exist.
}}}
The one at the bottom is
[[span(Log entry, class=label label-important)]]
{{{
2013-08-10 23:18:23,987 Trac[web_ui] ERROR: - bfa55047-dffa-
4c2f-b458-9924fec7c1e1 - Error rendering widget TicketQuery with options
{'args': {'max': 10, 'query':
'status=!closed&group=product&col=id&col=summary&col=owner&col=status&col=priority&order=priority&col=milestone',
'title': 'Active Tickets'}}
}}}
[[span(Traceback, class=label label-important)]]
{{{#!py
Traceback (most recent call last):
File "/path/to/bloodhound/bloodhound_dashboard/bhdashboard/web_ui.py",
line 269, in _render_widget
return wp.render_widget(name, ctx, options)
File "/path/to/bloodhound/bloodhound_dashboard/bhdashboard/util.py",
line 132, in widget_name_checker
return f(self, name, *args, **kwargs)
File
"/path/to/bloodhound/bloodhound_dashboard/bhdashboard/widgets/query.py",
line 100, in render_widget
data = qrymdl.process_request(fakereq, self.env)[1]
File
"/path/to/bloodhound/bloodhound_multiproduct/multiproduct/ticket/query.py",
line 164, in process_request
result = super(ProductQueryModule, self).process_request(req)
File "/path/to/bloodhound/trac/trac/ticket/query.py", line 968, in
process_request
return self.display_html(req, query)
File "/path/to/bloodhound/trac/trac/ticket/query.py", line 1116, in
display_html
self.env[BatchModifyModule].add_template_data(req, data, tickets)
File
"/path/to/bloodhound/bloodhound_multiproduct/multiproduct/ticket/batch.py",
line 25, in add_template_data
self.env = ProductEnvironment(global_env, k)
File
"/path/to/bloodhound/bloodhound_multiproduct/multiproduct/cache.py", line
67, in wrapper
result = user_function(*args, **kwds)
File "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/env.py",
line 385, in __call__
return ComponentMeta.__call__(self, *args, **kwargs)
File "/path/to/bloodhound/trac/trac/core.py", line 140, in __call__
self.__init__(*args, **kwargs)
File "/path/to/bloodhound/trac/trac/core.py", line 107, in new_init
original_init(self, *args, **kwargs)
File "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/env.py",
line 540, in __init__
raise LookupError("Missing product %s" % (product,))
LookupError: Missing product
}}}
They disappear immediately after checking out r1511730
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/596#comment:10>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #596: pagination on /dashboard confused
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#596: pagination on /dashboard confused
------------------------+--------------------------
Reporter: tim | Owner: matevzb
Type: defect | Status: review
Priority: major | Milestone:
Component: dashboard | Version: 0.6.0
Resolution: | Keywords: ticket query
------------------------+--------------------------
Comment (by matevzb):
Replying to [comment:15 olemis]:
> Replying to [comment:14 matevzb]:
> [...]
> >
> > Please check if r1513085 solves the above issues. At least the first
one should be resolved, I'm not sure about the latter (still can't
reproduce the errors).
>
> It's working now . Nevertheless I'd like to propose this tiny patch for
your consideration ...
>
> {{{#!diff
>
> diff -r 53b8c8a20bdb
bloodhound_multiproduct/multiproduct/ticket/batch.py
> --- a/bloodhound_multiproduct/multiproduct/ticket/batch.py Tue Aug 13
03:48:27 2013 +0000
> +++ b/bloodhound_multiproduct/multiproduct/ticket/batch.py Tue Aug 13
11:20:27 2013 -0500
> @@ -38,11 +38,13 @@
>
> data['action_controls'] = []
> global_env = ProductEnvironment.lookup_global_env(self.env)
> - tmpenv = self.env
> + cache = {}
> for k,v in tickets_by_product.iteritems():
> - self.env = ProductEnvironment(global_env, k) if k else
global_env
> - data['action_controls'] += self._get_action_controls(req,
v)
> - self.env = tmpenv
> + batchmdl = cache.get(k or '')
> + if batchmdl is None:
> + env = ProductEnvironment(global_env, k) if k else
global_env
> + cache[k] = batchmdl = ProductBatchModifyModule(env)
> + data['action_controls'] +=
batchmdl._get_action_controls(req, v)
> batch_list_modes = [
> {'name': _("add"), 'value': "+"},
> {'name': _("remove"), 'value': "-"},
> }}}
Looks good, I'll commit this after re-running all the tests. Thanks!
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/596#comment:16>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #596: pagination on /dashboard confused
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#596: pagination on /dashboard confused
------------------------+--------------------------
Reporter: tim | Owner: olemis
Type: defect | Status: needinfo
Priority: major | Milestone:
Component: dashboard | Version: 0.6.0
Resolution: | Keywords: ticket query
------------------------+--------------------------
Changes (by matevzb):
* owner: matevzb => olemis
* status: assigned => needinfo
Comment:
I couldn't reproduce above issues, but do you perhaps have any tickets in
the database without associated products? If so, is this deliberate?
(As far as I understood the multiproduct implementation, each ticket
should be associated to a product, otherwise we won't be able to perform
global and scoped queries, searches etc. Or maybe we could, but with lots
of problems.)
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/596#comment:12>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker