Needs review
Project:
Feeds Tamper
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
3 Oct 2011 at 06:44 UTC
Updated:
7 Feb 2024 at 13:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
twistor commentedI like it!
Comment #2
twistor commentedI'm thinking that we should have two separate plugins for backwards compatibility. I can mark the old one deprecated in the UI. But leave it for a while. hmm...
Comment #3
jeffschulerThanks for your support of this.
Why not provide both options? There are potential use cases for both.
Comment #4
twistor commentedI don't really want two plugins that do almost the same thing. At the same time, I don't want to have a check for the old configuration on every run either. Although I was making it more complicated than it had to be. I'll just add an upgrade routine the moves existing configurations over to the new one.
Comment #5
jeffschulerSounds good. This way of doing it is more sensible anyway, and can accommodate the other use case.
Comment #6
queenvictoria commentedI've created a patch to add the import fields as checkboxes and default to `all fields` if no fields are checked. It needs a bit of testing but its a start.
The reason I've implemented this differently is I want to import all the fields but only test uniqueness on some of them (as some source fields change when they shouldn't).
Comment #7
queenvictoria commentedComment #9
queenvictoria commentedLooks like this might have been included somewhere along the line as it is in 7.x-1.1. This issue should be closed I think. Twistor?Sorry I was looking at my patched version not 7.x-1.1
Comment #10
blanca.esqueda commentedHello,
Similar situation, I needed the hash being created base on some fields and not all the fields for that feed item, to be able to update changes instead of have new records when the feed import runs again.
Please find attached the patch. It has backwards compatibility so feeds that already use the hash tamper plugin won't be affected with this patch.
The patch allows the options to overwrite set values and hash all the fields of the feed item (as previously), plus the option of hash only the current value.
The option to hash only the current value combined to other tamper plugins offers a lot of flexibility.
As a sample to create the composed unique field: I used the rewrite plugin to concatenate the fields I needed and then used the hash current value option to generate the number to be assigned as GUID. But imagination is the limit, hash and other tamper plugins can be used to address other scenarios.
Comment #12
blanca.esqueda commentedThere you go again... removed message outputs.
Comment #13
blanca.esqueda commentedComment #15
blanca.esqueda commentedComment #16
blanca.esqueda commentedComment #18
blanca.esqueda commentedUpdated the ticket to needs review, because the patch it is working tried simplytest.me beside local testing.
The patch passed the hash test case but It seems like the other feed test cases have not been updated.
Comment #19
megachrizClosed #1444628: Add option to hash plugin to hash multiple fields. as a duplicate.
Quick glancing over the patches, to me it looks like the patch in #6 would be the most useful.