Skip to content
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

[REF] Fix import signature on activity parser, add preliminary test #19301

Merged
merged 1 commit into from
Jan 5, 2021

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Jan 1, 2021

Overview

Minor preliminary cleanup

Before

public function __construct(&$mapperKeys)

2/3 of the places that instantiate it pass in unused parameters

After

public function __construct($mapperKeys)

Technical Details

The construct class does not need to receive mapperKeys as a reference - this
was removed for Membership Parser here 14b9e06#diff-36f5db3555445d26df2de015a18598fd5d5682b76c62aee4f14dde95b7948274L65

In addition 2 places that instantiate this class pass in unused params (go copy & paste) so
that is removed. The test tests very little so far....

Comments

The construct class does not need to receive mapperKeys as a reference - this
was removed for Membership Parser here civicrm@14b9e06#diff-36f5db3555445d26df2de015a18598fd5d5682b76c62aee4f14dde95b7948274L65

In addition 2 places that instantiate this class pass in unused params (go copy & paste) so
that is removed. The test tests very little so far....
@civibot
Copy link

civibot bot commented Jan 1, 2021

(Standard links)

@civibot civibot bot added the master label Jan 1, 2021
@eileenmcnaughton eileenmcnaughton force-pushed the act_construct branch 3 times, most recently from 8371e96 to 15e60ea Compare January 1, 2021 22:20
@eileenmcnaughton
Copy link
Contributor Author

test this please

@eileenmcnaughton
Copy link
Contributor Author

@demeritcowboy I don't know if you have hit it but it's not currently possible to update an activity by import. I think the fix might not actually be that hard (I have more commits locally that follow on from this one & #19302 ) - not sure if this is functionality you have an interest in

@demeritcowboy
Copy link
Contributor

There was an older PR where that came up - the framework is there the radio just isn't placed on the form and then the final pieces at the end. Let me see if I can find.

@demeritcowboy
Copy link
Contributor

Link: #17932 (comment)

@eileenmcnaughton
Copy link
Contributor Author

@demeritcowboy hmm - I think there is more stuff in the validation code too. TBH I'm not sure why we need the checkbox - if the id field is there & mapped an update makes sense I think (I don't think the underlying code for replace vs fill is there but it is when I get the other parts cleaned up I'll revive it)

@demeritcowboy
Copy link
Contributor

Ok I don't fully remember, but I can review this one later today.

@demeritcowboy
Copy link
Contributor

  • General standards
    • [r-explain] PASS
    • [r-run] PASS
  • Developer standards
    • [r-code] PASS
    • [r-test] PASS

@eileenmcnaughton
Copy link
Contributor Author

thanks @demeritcowboy - @seamuslee001 @colemanw can someone merged based on above review

@seamuslee001 seamuslee001 merged commit af8567e into civicrm:master Jan 5, 2021
@seamuslee001 seamuslee001 deleted the act_construct branch January 5, 2021 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants