3

A recent change (link to Google Cache as d.p.org seems to be down right now) to the way Plone calculates the review list for the full_review_list view. In order to support LinguaPlone better, WorkflowTool now explicitly adds a Language='all' to the query used to retrieve a worklist, whereas before only results in the user's current language were shown. The code is in Products.CMFPlone.WorkflowTool#getWorklistsResults().

Is it possible to override this new behaviour to obtain the old behaviour?

Mike Rhodes
  • 1,816
  • 12
  • 15

1 Answers1

2

We really ought to make that customizable via a ZCML override, but you're right, in that form it's not overridable simply. So no matter what approach you're going to take, you'll have to copy that method and modify it somewhere else and then hook it in so that your customized version takes precedence.

Where do you need to see the changes? Just in the initial review list portlet? In that case, just override the renderer for that portlet, add a method to the new renderer, copy in the code, make your changes, then override the renderer to use the renderer method instead of the one on portal_workflow.

If you want to see the changes in the full review list you click through to from the portlet, then you'll have to use collective.monkeypatcher to patch the method on portal_workflow. I'd recommend against this, since you probably want someplace where users can go to see the full review list with all languages.

Ross Patterson
  • 5,702
  • 20
  • 38
  • In our use-case, there are editors on a per-language basis, so we don't require the "all" view; in fact, it's an active frustration to the content managers. An additional workaround is to use the built in site search: `http://plonesite.com/search?review_state=pending` – Mike Rhodes Aug 16 '11 at 14:10
  • If that's all you need, you could just use a collection with that criterion and point your reviewers to that collection. You could also replace the OOTB review list portlet with a collection portlet that points to it. – Ross Patterson Aug 16 '11 at 18:56
  • Keep in mind that the actual review list portlet dynamically assembles a catalog query for every workflow on the site where each workflow can define their own "worklist" states. So if you just use a hardcoded query for the "pending" state, you lose that dynamic behavior. This is no problem if you're just using the one OOTB default workflow. – Ross Patterson Aug 16 '11 at 18:59