1

On my site I have two content types:

  • event – with node flag “Attend” and Entity Reference field
  • band

And flags:

  • “Attend” – node flag - with Entity Reference field
  • “Accept” – flagging flag – connected to “Attend” flag

Each user can create unlimited number of Bands (he is manager of each Band) and create unlimited number of Events.
On Event creation form I add Entity Reference field with list of user Bands. This way band which he choose will become an Event organizer.
And now: other Users can click on flag “Attend” in Event node. On next step they need to choose witch of their bands will participate in this event (entity reference field)

Quick example:
“User 1” create “Band A”, “Band B” and “Band C”
“User 2” – “Band D”
Events and attendance:
“Band D” is the organizer of the “Event A”. “Band A”, “Band B”, “Band C” want to attend.
“Band A” create “Event B”. Attend: “Band D”,
“Band D” create “Event C”. Attend: “Band B”, “Band C”

In views I create a private page with table of events of each user. I add all necessary relationships to show Events of each user with list of bands which use “Attend”. Please imagine it as a table:

Band A – 1 event:

  • Event B
    • Band D – “Accept flag”(flag link)

Band D – 2 events:

  • Event A:
    • Band A - “Accept flag”
    • Band B - “Accept flag”
    • Band C - “Accept flag”
  • Event C:
    • Band B - “Accept flag”
    • Band C - “Accept flag”

User (author) creator of the event using flagging flag can decide which band he Accept for event.

Problem:
When Band D click “Accept” for Band B under Event A the status also change in Event C.
Do you think it is possible to separate this?
I hope I have described all process clear enough.
Thank you!

4
  • yes it will be using rule set Commented Oct 5, 2015 at 13:47
  • hmm.. Can you please explain? Commented Oct 5, 2015 at 13:55
  • @user3615934 Please clean up the formatting in your post. You can see the proper syntax by clicking the Help link. Commented Oct 5, 2015 at 19:14
  • Done. Sorry @ciss I am new here. Commented Oct 5, 2015 at 20:32

1 Answer 1

0

Using Drupal rules module you can set up the right triggering conditions. It is possible to use rules to alter the data in fields arbitrarily, however your question is a little confusing because bands are also described as users, so you would need to make use of user related fields in the rules configuration. Take a look at the large rules documentation section and this intro to the rules module to get an idea. Flag module is compatible with rules.

2
  • To be more precise: "Band" and "Event" are separate node types. User is just an author of many bands nodes. So he is flagging "Attend" on behalf of one of his bands. Commented Oct 6, 2015 at 7:24
  • This way flag is used on node-node relation. The problem is that Flagging Flag have problem joining Band with Event. @hongpong thank you for your advise. You think the Rules are the only solution? Maybe I need to try to get a Content ID in relationships and then add it to Flag relation? Commented Oct 6, 2015 at 7:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.