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

MLPAB-1552: Remove optional flags from ATTORNEY_SIGN email and channel #181

Merged

Conversation

acsauk
Copy link
Contributor

@acsauk acsauk commented Apr 25, 2024

Fixes MLPAB-1552

@acsauk acsauk marked this pull request as ready for review April 29, 2024 11:28
@acsauk acsauk requested a review from a team as a code owner April 29, 2024 11:28
Field("/channel", &data.Channel, parse.Validate(func() []shared.FieldError {
return validate.IsValid("", data.Channel)
}), parse.Optional()).
Field("/email", &data.Email, parse.Optional()).
Copy link
Contributor

Choose a reason for hiding this comment

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

you'll want to keep this optional

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We will always expect an email via the online channel...are you referring to this event listener being used for paper attorneys via scanning?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah 😅

}

// Changes constructs a new [Parser] for a set of changes.
func Changes(changes []shared.Change) *Parser {
func Changes(changes []shared.Change, lpa *shared.Lpa) *Parser {
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the purpose of passing lpa in here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I kept getting a null-valued lpa when accessing it from within the closures so I needed a way to pass it down through the chained functions. I think what was actually happening was debug in Goland was only showing values there if it was accessed in code as everything is working referencing the lpa directly.

I'll revert this 👍

@@ -43,18 +43,27 @@ func validateAttorneySign(changes []shared.Change) (AttorneySign, []shared.Field
}

data.Index = &i
data.Mobile = p.Lpa.Attorneys[i].Mobile
Copy link
Contributor

Choose a reason for hiding this comment

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

couldn't this be lpa.Attorneys[i].Mobile?

@acsauk acsauk merged commit 6c19017 into main Apr 29, 2024
23 checks passed
@acsauk acsauk deleted the MLPAB-1552-enforce-existing-values-match-old-remove-optional branch April 29, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants