As reported at http://www.ubercart.org/issue/8816/role_assignment_expiration_never_does..., editing a role feature to never expire does not actually change the settings of that feature. Even worse, it looks like it does on the features list of that product.

On further investigation, removing the expiration override for that feature did not change its expiration to the store's default (which was "never"), but reverted it to the saved expiration of 2 days after purchase.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RachelNY’s picture

Is there any kind of "brute force" fix I can do to temporarily patch this until it is properly addressed. I don't mind hard-coding something in so every purchase gets this role with expiration set to "never".

Thanks,
Rachel

cha0s’s picture

Assigned: Unassigned » cha0s
FileSize
4.16 KB

No need Rachel. Here's a patch that fixes the 'never' bug (actually, it's a drupal_write_record bug, but we'll work around it) and also makes it clear on the role feature description when a global expiration is being used as opposed to one overridden at the product level.

RachelNY’s picture

I applied the patch, thank you. You made my day!

We still have an issue:

When I set the global expiration to "never" and then add the role to the product, if I do not "Override the default ending expiration" it still expires as soon as it is created and running cron removes the role.

The patch does seem to work if I go into each product and "Override the default ending expiration" and set it to "never" even though that is how it is set as default.

I am just glad to have it working. Thanks again!
Rachel

Island Usurper’s picture

Status: Active » Needs work

I think it's more useful to have the description to have what the global expiration is, rather than that it's not overridden. I was more concerned that the description was inaccurate than I was that I didn't know if it was overriding the global setting or not.

RachelNY’s picture

To be clear, when I setup a product and add a role assignment, I have to override the default or it expires as soon as it is created. I have no comment or opinion on the description. When the global default is never and I use the global default on the product role assignment it fails as it expires immediately (and is removed when cron is run). It works fine when I override the default to have the exact same value as the default.

One more issue: The role assignment only is working when "Product and its derivatives are shippable." is unchecked. The role assignment on my site is associated with both shippable and downloadable products, but the role only gets assigned if I uncheck the "Product and its derivatives are shippable." box.

Thanks again for all the help...
Rachel

cha0s’s picture

The description will be inaccurate as soon as the global setting is changed, cause those descriptions are static... that's why I made it say what it does, but if you think setting the current global expiration at the time of feature creation is a better plan, that can be done.

Rachel, I created a new issue for the expiration granularity bug here: http://drupal.org/node/368178

Regarding the shipping problem, have you checked the 'Shippable product: Check if this product SKU that uses role assignment is associated with a shippable product.' checkbox on the product feature settings?

RachelNY’s picture

>>have you checked the 'Shippable product: Check if this product SKU that uses role assignment
>>is associated with a shippable product.' checkbox on the product feature settings?

Yes, this is checked.

>>The description will be inaccurate as soon as the global
>>setting is changed, cause those descriptions are static...

It doesn't matter to me what the description says. I think it is better now, I like the change you made.

The issue I am trying to address is that the default setting does not work when it is set to "never". I have to override the default to make "never" work, this has nothing to do with the description. I can't just go into the product features setting and use default, I have to override.

Right now the shippable product is a more pressing issue for me as I gone into each product individually to override the default (even though the setting is exactly the same).

Thanks,
Rachel

Island Usurper’s picture

Ah, that's right. I forgot that part about the description being static. How about a link back to the settings page, so it's easy to remind yourself what the global expiration is set to?

RachelNY’s picture

I am not at all concerned about the description. The global setting simply does not work when it is set to "never".

Is there anything we can try for the shippable products or do I have to make everything not shippable to get it working correctly?

Thanks,
Rachel

cha0s’s picture

Status: Needs work » Needs review
FileSize
4.24 KB

Sorry Rachel, but I can't reproduce either of those issues...

New patch with a link.

Island Usurper’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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