-
-
Notifications
You must be signed in to change notification settings - Fork 827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix master-only regression on showing fields for contact type #23329
Fix master-only regression on showing fields for contact type #23329
Conversation
(Standard links)
|
a0ab2f0
to
a31e842
Compare
*/ | ||
protected function getContactType() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to the parent
protected function getContactType() { | ||
return $this->_contactType ?? 'Individual'; | ||
public function getAvailableFields(): array { | ||
$this->setFieldMetadata(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setFieldMetadata
means we don't need to call run
or init
first - but I think this will evolve as we clean up the inputs on construct
a31e842
to
17549e7
Compare
17549e7
to
52bd01f
Compare
$importer->init(); | ||
$importer->_contactType = $this->getContactType(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that per class code comments - this function is only called from unit tests
Thanks I'll try to take a look tomorrow. Or do you prefer the "names" one first? |
@demeritcowboy I guess either is fine - but I'll put up a PR with both in case you want to test all together |
Noting separately that there's all kinds of "undefined offset" errors coming up, and that clicking cancel on the map fields page when doing contact import always takes you to Activity Import instead of back to Contact Import. |
@demeritcowboy I didn't replicate the activity import bounce just now - the undefined errors I'm seeing are mostly on the preview page when there is only one row - and the 'isCheked' one that I haven't thought of a good fix for |
Ok the bounce seems semi-random. Sometimes it goes to the home page, sometimes it goes somewhere else. It seems to depend where you've visited, but not the immediate page you visited before, just something chosen from your past. I'm thinking now it's not specific to this. |
@demeritcowboy yeah I wound up at search - |
Overview
Fix master-only regression on showing fields for contact type
Before
Master-only regression whereby contact-type-specific fields were not being offered up for mapping for Organization and Household
After
Back to the future
Technical Details
The issue was the available fields were being calculated before the contact type was available. There is definitely an intent to be able to get this data withough going through the
run
function which is is a jack-of-all-trades-and-a-master-of-none so I added a funciton to do that - using the userJobID as the source of information forcontactType
I also hit an uncaught exception - I added a catch for it but it is not quite being handled consistently with other errors as their handling will change in #23292
Comments
@demeritcowboy tthis is a fix for the issue you found