Closed (fixed)
Project:
Salesforce Suite
Version:
7.x-3.x-dev
Component:
salesforce_mapping.module
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
25 Mar 2013 at 00:34 UTC
Updated:
25 Apr 2014 at 19:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
kostajh commentedThanks for this.
#2 seems a lot simpler. Any reason not to go that route?
This should be renamed to
_salesforce_mapping_get_required_mapping_fieldsComment #2
kostajh commentedAlso... any chance you could re-roll this? I am not able to apply. I checked out a commit (65344de) which includes the 5 issues you've mentioned above, but can't get either patch to apply cleanly.
Comment #3
ceardach commentedThe first patch sets up the ability to to do the second patch. Both are required. I have them separated because it is two distinct tasks, IMO.
The
_sfm_*functions are helpers and "sfm" (aka: salesforce_mapping) is used for brevity's sake and readability since they are used extensively throughout the file. I can change them all to_salesforce_mapping_*if you would prefer.A bunch of
isset($mapping)got changed toisset($mapping->foo)in the file somewhere along the way causing the conflicts. I've rerolled patch 01 which fixes the problem. The original 02 patch still is fine.Comment #4
levelos commented@ceardach, the direction of these patches is great, although I can't get either patch to apply cleanly against head. Not a big deal, but I'd also prefer to keep all function names in the
_salesforce_mapping_*format to respect the module namespace. Thanks!Comment #5
kostajh commented@ceardach If you can re-roll this one more time to address the namespace issues and also to make sure it applies cleanly against the latest 7.x-3.x code, I'd very much appreciate it. Thanks!
Comment #6
ceardach commentedRe-rolled and converted the _sfm_* functions.
Comment #7
kostajh commentedThis seems okay to me. It is a lot to review! I did some tests with setting up mappings and editing existing ones without finding any problems.
I'd quite like to get this in so we can move on to #1951744: Tests! For just salesforce_mapping's admin form, but it's a start..
@tauno or @levelos can you review?
Comment #8
levelos commentedAssigning to @bleedev for review and hopeful commit this week.
Comment #9
bleedev commentedMade a few adjustments and committed to 7.x-3.x. Thank you ceardarch.
Comment #10
ceardach commentedThe alterations to the patch introduced a bug that prevent the "direction" radio buttons from having the correct default values when the table is refreshed. I'm going to investigate and give you a patch.
Comment #11
bleedev commented@ceardarch That bug was resolved today in commit ee7ee3. However, if you have a better resolution please post it.
Comment #12
ceardach commentedThe initial problem was caused by adding the "break" after the "direction" case in
_salesforce_mapping_get_default_value(). That case needed to inherit the default case which is why there was no break between the two. The change you had made only recalled the last saved value, not the inputted value, nor would give a default value. The attached patch restores the form to its original state.Also, I moved the setting of the key value up to the section for fields without deltas since it is a non-delta field.
Comment #13
bleedev commented@ceardarch I see what you did there. I added a small comment for future devs so they won't make the same mistake I did in assuming that the break was missing. Also made a few changes to handle the Key. Thank you for the update, it has been committed to 7.x-3.x, commit 17cc53d