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

Fix for CRM 19881: Clobbered time for receive_date and trxn_date #9680

Merged
merged 1 commit into from
Jan 31, 2017

Conversation

h-c-c
Copy link
Contributor

@h-c-c h-c-c commented Jan 14, 2017

https://issues.civicrm.org/jira/browse/CRM-19881

Unlike api.contribute.create, api.contribute.repeattransaction and completetransaction zero out the time stamp in parameters receive_date and trxn_date respectively.

What api.contribution.create shows in receive_date is something like:
2017-01-14 16:10:45

However, what api.contribution.repeattransaction shows in receive_date is something like:
2017-01-14 00:00:00

This is because the specification is:
'type' => CRM_Utils_Type::T_DATE,
Instead of:
'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,

Same issue for completetransaction and it's trxn_date parameter.

@civicrm-builder
Copy link

Can one of the admins verify this patch?

@totten
Copy link
Member

totten commented Jan 16, 2017

jenkins, ok to test

@h-c-c
Copy link
Contributor Author

h-c-c commented Jan 17, 2017

@totten Jenkins is so mad at me. :P This branch was such a cluster, since it was based on the wrong branch. Should I just close this and start over? Thanks

@totten
Copy link
Member

totten commented Jan 17, 2017

@h-c-c , yeah -- if the original work was based on a very different branch or has "merge commits", I usually find it easier to start-over (and maybe try git cherry-pick or git cherry-pick --no-commit).

Personally... if my starting branch is fairly close but has one conflict... then I tend to update PR's using git rebase instead, e.g.

git fetch origin
git rebase -i origin/master

The neat thing is that it gives some chance to edit/combine/discard your changes. However, if you do a rebase, then you also need a force push, as in:

git push -f h-c-c CRM-19881

@h-c-c
Copy link
Contributor Author

h-c-c commented Jan 18, 2017

Thanks so much @totten! I rebased and forcefully pushed.

Can I enlist jenkins? or do you have to?

@totten
Copy link
Member

totten commented Jan 18, 2017

Hopefully neither of us need to. ;) Once the PR or author is approved, any updates to the PR will automatically trigger a re-test in Jenkins.

@eileenmcnaughton eileenmcnaughton merged commit 338d5ac into civicrm:master Jan 31, 2017
@eileenmcnaughton
Copy link
Contributor

This is just a (sensible) change to the field definition, approving

@h-c-c
Copy link
Contributor Author

h-c-c commented Jan 31, 2017

Thanks!

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.

4 participants