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

Respect form value for register_date on partipant form #16439

Merged
merged 1 commit into from
Jan 31, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Jan 31, 2020

Overview

Fixes a bug whereby the participant registration date is exposed on a field on the backoffice event form, but when a credit card payment is being submitted it is ignored

Before

Registration date field always present, but ignored in credit card mode

Screen Shot 2020-01-31 at 5 55 30 PM

After

Value entered is used

Technical Details

The backoffice event registration form has a register_date field. In credit card mode it
does an awful lot of handling which is mostly for legacy code reasons but the net result is to ignore it
& set it to now. However, the field defaults to now & if someone actually changed it they would expect their change to
be respected. This removes that handling & just uses the field value entered. The field is always present from my
digging

Comments

The backoffice event registration form has a register_date field. In credit card mode it
does an awful lot of handling which is mostly for legacy code reasons but the net result is to ignore it
& set it to now. However, the field defaults to now & if someone actually changed it they would expect their change to
be respected. This removes that handling & just uses the field value entered. The field is always present from my
digging
@civibot
Copy link

civibot bot commented Jan 31, 2020

(Standard links)

@civibot civibot bot added the master label Jan 31, 2020
is_array($params['participant_register_date']) &&
!empty($params['participant_register_date'])
) {
$registerDate = CRM_Utils_Date::format($params['participant_register_date']);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is handling for pre-datepicker days

@seamuslee001
Copy link
Contributor

Looks fine @eileenmcnaughton do you think we would ever want to expose the field on edit at all?

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 I think it is exposed & I think that makes sense - I mean why not be able to edit the registration date? Backoffice users should have the power I think

@seamuslee001
Copy link
Contributor

yeh got confuzzled there for a moment all good added MOP

@seamuslee001
Copy link
Contributor

Jenkins re test this please

@seamuslee001 seamuslee001 merged commit 078af00 into civicrm:master Jan 31, 2020
@seamuslee001 seamuslee001 deleted the part_odd branch January 31, 2020 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants