Calendar Repeat dates question

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
bodyblueprinter's picture

HI Everyone,
I am trying to find a way to simply and cleanly add a (completed) flag to individual repeating date. I have a calendar that sets tasks for repeated schedule and want a way to flag each date as complete. I am finding very little in my searches and wonder if anyone else has run across this functionality? Any leads will help. Date instance may be the solution, but I am not sure how I feel about breaking each date off into a separate node.

Thanks!

Comments

Update

bodyblueprinter's picture

Date Instance is not really what I am after...creates a whole bunch of nodes that are not needed.

I don't understand your needs

darrylri's picture

I don't understand your needs specifically enough, but can't you use Rules or Rules Scheduler to clear the date field when the task is done?

Or, add a field that indicates that the task is completed. You can use Rules to set it and clear it and you can filter with it in Views, and if you need to run Rules against the active ones, you can use Rules Extras to get a list generated by Views to run against.

Thanks

bodyblueprinter's picture

I will look into that....the repeat dates are associated to a task node, so I will have to look into rules scheduler some more, I am not as familiar with it. I am looking for something that operates more as a flag than an edit a node. The trouble form my perspective (for what it is worth) is that it seems Date, specifically repeat dates, do not have an entity property. My attempts so far leave me with flag one date in the calendar as completed, all of the dates get flagged. I am trying to keep it so the end user (the who has the task assigned) is inclined to mark complete because it is a single click instance, not a click edit --> change field --> click save........ahhhh end user compliance :)

I will look at how I may be able to use Rules/Rules Schedule to break out each repeating date as separate from the rest.

Thanks!

So let me see if I understand you

Torenware's picture

You have a node type which has a set of date fields created using one kind of date Field widget or the other.

You want to attach a flag of some kind that indicates if the task is completed or not (possibly by using My Tiny Todo, from the sound of it).

Suppose you did the following:

  • For each date you want to be able to "check off", add a field that indicates whether the task is done or not.
  • Using Rules, respond on the "Node Pre Save" event, sync things up in the fields, so that they will get saved, after your actions in that rule complete.

Without knowing a little more about what you're doing, that's about all I can suggest.

The Flag modules does many

darrylri's picture

The Flag modules does many "flag-like" things and integrates well with Rules. If you need a flag to associate with each date value, you may have to use something like Field Collection to group them together. Then you can have multiple Date/Flag items on a node.

Might work at that

Torenware's picture

IIRC, Flag wants to own a field for each flag. Since a Field Collection turns out to be a fieldable entity (and it is -- I checked the source) you can very definitely slap flags on a Field Collection.

So Darryl's right -- you can

  • Make your task item a Field Collection that contains whatever data you need to group together.
  • Attach a field to the task item.
  • Make sure the field you attach is known to the Flag module.
  • Use Rules to set or unset the flag.

I'm not sure if there's an easy way to trigger a Rule from the UI (if there isn't there ought to be), but you'd use that to let people "check off" the item, triggering your logic.

Amazing information

bodyblueprinter's picture

I am still cutting teeth on what Rules can do and have not full understood Rules Scheduler. I am currently using field collections as part of the task list......Having said that, it seems I have been vague on my objective.

I am working on a site for a gym, the needs are that there are various tasks to assign. The request is for them to appear in a calendar for maintenance and other regularly occurring tasks that get assigned to various staff members. for this I was using Date module and repeating dates, but the request was for being able to check off tasks on each instance of a repeating date. This is where I ran into trouble. Repeating dates seemed to act as an entity as a group, not individual instances. I will have to do some learning on the suggestions above, which seem solid.
To me using the Field Collection option seems like setting an individual task vs setting a date sequence of "once every week" that Date Repeats offer. Please forgive my lack of understanding on this point, I am happy to learn. It will probably take me a few days to filter through the options, but I am grateful for the leads.
I have seen some calendar todo list information, but none seemed to utilize the date repeat function, just setting on off tasks which seemed easier to do from UI standpoint with My tiny ToDo, so that is part of assigning the personal list on account creating (for each staff member), which I can look into the timing of triggers in rules.
Lots for me to explore at this point so I will have to check back.
Tahnk you Darryl and Torenware!