Comments

dww’s picture

Status: Active » Needs review
StatusFileSize
new990 bytes
dww’s picture

Status: Needs review » Postponed

Committed #1 to HEAD.

However, I just thought of an edge case we need to fix. If an admin changes the "Modifies signup count" value on status values that have existing signups in them, we need to do a potentially heavy operation of updating all the {signup_log} records accordingly. Plus, we need to check the effective signup total vs. the limit on any nodes we touched, so this definitely needs batch API...

So, this would be back to active, but it should be blocked on #581846: Cleanup the signup_status admin UI and provide status weights landing so that we don't touch the admin UI with separate patches...

dww’s picture

Status: Postponed » Active
dww’s picture

Status: Active » Needs review
StatusFileSize
new6.29 KB
dww’s picture

Rerolled to keep up with HEAD.

dww’s picture

StatusFileSize
new1.26 KB

Now that we've got this function, inside the schema update where signup is adding the {signup_log}.count_towards_limit column, we should invoke this batch-aware function to properly initialize {signup_log}.count_towards_limit on sites that have signup_status and have some status options configured to not modify the signup limit...

I tested this, and setting more batches inside an update.php batch works just fine. Phew. ;)

dww’s picture

Status: Needs review » Needs work

#582250: When you delete a status, signups are left with bogus data made me realize that we also need to deal with some of this batch stuff over there, since it's possible the new status we're reassigning signups to has a different value for mod_signup_count. ;) Fun... I'll see how quick/easy I can reroll this.

dww’s picture

Status: Needs work » Needs review
StatusFileSize
new9.35 KB

That could have been a lot worse. ;)

mlsamuelson’s picture

The patch applies cleanly.

Any suggestions for how best to test the changes?

dww’s picture

Suggestions for testing:

a) create some signup-enabled test nodes, and give them some relatively low signup limits (e.g. only 3 slots).

b) define a few different status values that should/shouldn't impact the total, e.g. "yes", "maybe" and "no".

c) signup some dummy users with the different status values, using a few yes/no, and a lot of maybe.

d) visit admin/settings/signup_status, and tweak if "maybe" counts or not. you should see signups open and close on your nodes, assuming the maybes are enough to either push the effective total over/under the limits...

mlsamuelson’s picture

Status: Needs review » Reviewed & tested by the community

I setup a test as described. Works slick. I like it.

dww’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks for the tests!

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Does this patch exist for the v5 module?

dww’s picture

@Quartz: No. The v5 module is completely different from the D6 one, and basically abandoned at this point.

Anonymous’s picture

Thanks for the prompt reply dww.