I'm working on a large Open Atrium project, and we want to use Workbench Moderation. There is some requirement for the users to be able to choose different workflows, so we're writing some code to do that. To that end, it would be really useful to have transitions be entities.

I've done so in the module linked above, but it makes more sense for that to be handled at the originating module that creates the table.

Patch forthcoming.

Comments

srjosh’s picture

Status: Active » Needs review
StatusFileSize
new3.99 KB

Status: Needs review » Needs work

The last submitted patch, 1: workbench_moderation_2174343.patch, failed testing.

srjosh’s picture

StatusFileSize
new9.09 KB
srjosh’s picture

Status: Needs work » Needs review
srjosh’s picture

StatusFileSize
new9.94 KB

This patch allows for editorial control of the transition name, a useful function.

srjosh’s picture

StatusFileSize
new9.55 KB

New patch enabled feature exportability of name field.

srjosh’s picture

StatusFileSize
new10.57 KB

Missed a pretty vital function. Here's v5

  • Commit b38ac3e on 7.x-1.x by srjosh:
    Issue #2174343 by srjosh: Make transitions into entities, for use with...
srjosh’s picture

Status: Needs review » Fixed

This is committed, as noted above.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

gabriel.achille’s picture

I'm running SQL Server 2012 and the function workbench_moderation_update_7009 is causing me trouble:

PDOException: SQLSTATE[42000]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Procedure or function dbo.CONCAT has too many arguments specified.

The SQL Server Drupal driver had to (re-)defined the concat function and it accepts only 2 arguments.
I had to modify the function from:

  db_update('workbench_moderation_transitions')
    ->expression('name', "CONCAT(from_name, '-', to_name)")
    ->execute();

to

  db_update('workbench_moderation_transitions')
    ->expression('name', "CONCAT(CONCAT(from_name, '-'), to_name)")
    ->execute();

Any better suggestions ?