A follow up to the Rules port: When changing the transaction "status" on the "User will be awarded points" event, the "set data value" action won't save. The following message is displayed: "The selected data property doesn't support writing."

The "set data value" action already works for other types of Userpoints transactions data... just not "status" at the moment.

--Ben

CommentFileSizeAuthor
#1 allow_status_change.patch1.04 KBberdir

Comments

berdir’s picture

Component: Code: userpoints_rules/userpoints_workflow_ng » Code: userpoints API
Status: Active » Needs review
StatusFileSize
new1.04 KB

Fixing this is quite simple.

This seems to work but does generate warnings inside entity.module. I'm not sure if that's a problem with userpoints.module or entity.module.

BenK’s picture

Status: Needs review » Needs work

The patch worked well. I'm now able to change the transaction status successfully.

The only warnings I'm getting are the following:

Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /Users/benkaplan/git/drupal-7.0/includes/entity.inc).
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 354 of /Users/benkaplan/git/drupal-7.0/includes/entity.inc).

I'm not sure if the above notices are actually related to this patch or if something changed with entity/rules that is now causing this warning. I tested adding points with the rule disabled and I still got the notices. Was this warning you were talking about?

But as far the functionality goes, this is working great. I'm not sure if I should mark this RTBC or wait to get to the bottom of the warnings. I'm holding off for now.

--Ben

berdir’s picture

Status: Needs work » Needs review

Updated rules/entity and now I'm not getting any errors anymore.

BenK’s picture

Status: Needs review » Reviewed & tested by the community

You're right... I tried the patch again with the latest rules/entity. The warnings are gone and the patch works great. This is RTBC.

--Ben

berdir’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for testing, commited.

Status: Fixed » Closed (fixed)

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