hi,..i wonder if there's a Rules integration for D7 version?

CommentFileSizeAuthor
#19 rules-pcp.png40.51 KBBarisW

Comments

BarisW’s picture

No, not yet. How do you see it working? Can you explain a use-case where it makes sense?

hendroutomo’s picture

well,..since i'm not a programmer :) i imagine that one can add certain rules after profiles are completed by user, ex send email to user, or give points to them. And when their profile isn't complete we can blocked pr give them restricted role to them.

BarisW’s picture

Ok, that makes sense. Can you provide me with a list of Conditions/Triggers you'd like to see?
Some I can think of:

Conditions:
- User profile is completed (true/false)

Triggers:
- User improved profile data (submits one or more fields)?

Any more you'd like to have?

hendroutomo’s picture

Conditions:
- User profile is completed (true/false)

Triggers:
- User improved profile data (submits one or more fields)

right now this is what i looking for :) maybe other drupalers have some other thing?

hendroutomo’s picture

the Content Complete module has it's Rules integration,...and i think it's just when User profile is completed. sory,..here's their documentation regarding Rules configuration CC Documentations

hendroutomo’s picture

how is this issue going?

BarisW’s picture

Status: Active » Needs review

Committed the condition to DEV. The trigger is harder to implement, because therefor the logics of the module needs to be changed a bit. Let me know if you really need that now.

BarisW’s picture

Status: Needs review » Fixed

No response in a month, so marking this fixed.

Status: Fixed » Closed (fixed)

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

brayo4’s picture

Status: Closed (fixed) » Needs review

Hello, has the rules integration been activated?? block still shows even after profile = 100%. thank you for your work.

BarisW’s picture

Status: Needs review » Closed (fixed)

Hey. Your issue has nothing to do with Rules.
Please open a new issue instead of re-opening non-related ones.

What you describe is a configuration in the PCP settings (hide block when completed). Did you check your settings?

hanskuiters’s picture

@BarisW: Reading back I guess you paused the development on the Rules Trigger. How much work is their to do? I need users to complete their profile before they can go any further on the website. So I need a trigger that reads the percentage. Something like this:

//example script
if ($percentage < 100%) {
  drupal_goto('page to explain that they need to complete profile');
}

I could make my own module for it, but if you are just about their, I like to try/test your solution.

bartezz’s picture

Rules integration would make this module much more functional. Views integration would definately rock as well. It only works as a display function right now.

Would I think what would improve the module as well is not to check for mandatory fields but have this a seperate setting. I can imagine that mandatory fields are an absolute minimum but maybe onely make up 50% of a 'complete' profile. With current options of PCP this isn't possible.

Cheers

lonehorseend’s picture

Status: Closed (fixed) » Active

From what I'm reading, this issue really is still an issue, correct? What is the update on Rules integration? I can't seem to find the conditions in Rules created by this module.

BarisW’s picture

Status: Active » Closed (fixed)

@capano: you can do that with the Condition (if profile is not completed, goto.. )

Bartezz: Rules integration is already in code. New improvements are welcome, but in a new issue and not in existing issues.

@lonehorseend: Conditions should work (try the 7.x-1.x-dev)

lonehorseend’s picture

That's just it. I am. 7.x-1.3+9-dev is the version and I see the pcp.rules.inc file. I'm not using the core profile. I'm using the profile2 fields and I've set a few fields to PCP required.

BarisW’s picture

Status: Closed (fixed) » Active

We might need to double-check if this is working.

The integration has changed in issue #1705434: include files are always included and we have two more issues dealing with this: #1855124: pcp.rules.inc is added twice and caused WSOD and #1900240: Fatal error: Cannot redeclare pcp_rules_condition_info().

Time, if I only had more time ;)

lonehorseend’s picture

Time . . . What's that? A four letter word that often escapes it's meanining and is either too short or too long . . . :) I understand completely.

Anyway, quick question, do I have to load the user in rules to get access to this, perhaps?

BarisW’s picture

Status: Active » Closed (works as designed)
StatusFileSize
new40.51 KB

Try clearing caches.

After I cleared my caches, the Rule appeared. See screenshot.

rules-pcp.png

Anonymous’s picture

Category: feature » bug
Status: Closed (works as designed) » Active

Rules integration seems to be missing from latest devx. It seems that the pcp.rules.inc is not loaded?

Anonymous’s picture

Status: Active » Closed (works as designed)

Never mind, is due to profile2

scottsawyer’s picture

@morningtime
How was this due to profile2? How did you fix / change it?

@BarisW
I am not seeing the Condition "User Profile Complete". I am on 7.x-1.4 and cleared caches.

Is this only supposed to work on the Dev branch?

What other information can I give you?

** Edit **
I installed 7.x-1.x-dev and it appears in the conditions. Thank you!