I have a need to extend Computed Field with 2 new columns: "Logic" (where I store a serialized array of the steps in the calculation of the computed value) and Timestamp (where I track the timestamp of the computed field, separately from $node->changed
, for saving-in-place updating.)
I'm not sure if this is of general interest to the module's users or maintainers, but I thought I'd share the code I've written so far (modifying computed_field), and see if anyone else has a use for this. So far it adds checkboxes to toggle logic and timestamp, creates the columns, and saves the data. The next step will be integrating the new columns properly with Views, so I can run a report showing the computed values, times they were computed (with filtering), and the logic.
The patch is rolled from the latest 6.x-dev release.
Comment | File | Size | Author |
---|---|---|---|
#2 | computed_field-logic+timestamp.patch | 6.47 KB | thebuckst0p |
#1 | computed_field-logic+timestamp.patch | 4.33 KB | thebuckst0p |
computed_field-logic+timestamp.patch | 3.03 KB | thebuckst0p |
Comments
Comment #1
thebuckst0p CreditAttribution: thebuckst0p commentedNew patch --
* Added a views field handler for the new serialized Logic field
* Moved most of the modifications to a computed_field_extra submodule.
Unfortunately, due to problems with
drupal_alter
'ing the 'database columns' op (discussed here), some of the modifications still have to be in the main module to work (unless I make a separate table for the new columns, which seems like a waste of aJOIN
.It still needs a Views handler (field and maybe filter) for the timestamp column.
As mentioned before, I'm not necessarily requesting that this be considered for committing into the main module -- I'm just curious if anyone else is interested in this, and want to share it (and get collaboration/feedback) if so.
Comment #2
thebuckst0p CreditAttribution: thebuckst0p commentedFinal working draft of the patch, fixed some bugs from the previous one.
Comment #3
mmjvb CreditAttribution: mmjvb as a volunteer commented