Here's my situation:

I have two content types:

Submission
-- Review Count (Field)
Review
-- Reference (Field)

- Submissions are created by the public, and 2 or more Internal Reviewers are assigned to each Submission.
- Once reviewed, reviewers must submit a "Review" node, referencing ( Using a Node Reference via http://drupal.org/project/references ) the "Submission" they reviewed.

I'm looking to get Rules to, upon saving the "Review" content type — load the referenced "Submission" and insert a + "1" in the "Review Count" field.
I can get Rules to *load* the referenced node's "Review Count" field value (using "Show message", and "Fetch entity by id"), but I can't change the value.

Anyone with better knowledge of Rules, that can weigh in here, and let me know if I'm off my rocker on this?

Notes: Tried Workflow module, but it only handles linear workflows, and I need to keep reviewer comments hidden from each other, so a separate content type was required.

Comments

acrazyanimal’s picture

Component: Rules Core » Rules Engine

First things first ... are you using the "set data value" action to try and set the value, because that should work.

secondly, I believe you can increase the value by adding an offset of 1 in the 'set a data value' action and setting the value to its current value using the 'data selection mode'. Hopefully, that just made sense.

thirdly, make sure you're not missing any permissions to edit that field by any access modules you may have enabled just in case that is affecting it.

Hope, that helps. :)

tr’s picture

Component: Rules Engine » Rules Core
Issue summary: View changes
Status: Active » Fixed

@wOOge: Because you never responded, I have to assume that either the advice that was given by @acrazyanimal fixed your issue or you figured it out on your own and never bothered to post the answer you found.

Regardless, I doubt you still need help after almost 8 years, so I'm closing this issue.

tr’s picture

Status: Fixed » Closed (fixed)