Problem/Motivation

The form at /admin/structure/workbench-moderation/transitions can set weights from -23 to +23. But the form to edit a single transition state is limited to -10 to +10. Setting a transition greater than +/-10 and then editing the transition causes the value to revert to -10.

Proposed resolution

Set the edit transition form to accept values of -23 to +23.

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

itmaybejj created an issue. See original summary.

balsama’s picture

I put this in the 1.01 sprint: #2698181: [META] Lightning 8.x-1.01 but I suspect we can quickly fix this post RC1 and get it into whatever the next release turns out to be. At a minimum, I suspect we can provide a patch for this next week.

Thanks!

balsama’s picture

Moved to RC3 sprint. And I started referencing the issues included in sprints. So you should see the sprint issue in the sidebar now.

itmaybejj’s picture

awesome thanks

balsama’s picture

Project: Lightning » Workbench Moderation
Version: 8.x-1.0-beta5 » 8.x-1.x-dev

Ah - lightning actually isn't touching that form (I thought it was).

Digging a little deeper, it looks like the form at /admin/structure/workbench-moderation/transitions only goes from ±10. But that number is increased when the number of total transitions is greater than 20. At that point, editing an individual transition that has its weight set to >10 or <-10 will result in it being reset to 10/-10.

Crell’s picture

First off, what are you people doing that you have more than 20 transitions???

The issue here is that the draggable list weight field is automatic, and always uses negative numbers up to the number of items, so it scales for any number of items. The translation edit form uses the normal weight form element, whose default delta is 10.

The attached patch makes the transition edit form's delta dynamic as well.

balsama’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
FileSize
90.21 KB

Manually tested an confirmed. I created [a ton] of moderations state transitions, dragged one to the top of the list, then clicked "show row weights" and confirmed that the first transition's weight was -12 (as expected). After applying the patch, the edit form for that transition displays -12 as well.

Thanks!

  • Crell committed 0c5527f on 8.x-1.x
    Issue #2695543 by Crell: Form mismatch loses order setting in Workbench...
Crell’s picture

Status: Reviewed & tested by the community » Fixed

Spiffy. Merged!

Status: Fixed » Closed (fixed)

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