-
Notifications
You must be signed in to change notification settings - Fork 0
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
MLPAB-1552: Remove optional flags from ATTORNEY_SIGN email and channel #181
Conversation
…SIGN email and channel
Field("/channel", &data.Channel, parse.Validate(func() []shared.FieldError { | ||
return validate.IsValid("", data.Channel) | ||
}), parse.Optional()). | ||
Field("/email", &data.Email, parse.Optional()). |
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.
you'll want to keep this optional
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.
We will always expect an email via the online channel...are you referring to this event listener being used for paper attorneys via scanning?
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.
https://github.com/ministryofjustice/opg-modernising-lpa/pull/1200/files#diff-75a2c79a05d59597c29f665f8d24662c63e9ac5e83bdae3eff8de38a0067920dR150 but it will only be sent when it changes
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.
Ah 😅
lambda/update/parse/changes.go
Outdated
} | ||
|
||
// 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 { |
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.
what is the purpose of passing lpa
in here?
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.
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 👍
lambda/update/attorney_sign.go
Outdated
@@ -43,18 +43,27 @@ func validateAttorneySign(changes []shared.Change) (AttorneySign, []shared.Field | |||
} | |||
|
|||
data.Index = &i | |||
data.Mobile = p.Lpa.Attorneys[i].Mobile |
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.
couldn't this be lpa.Attorneys[i].Mobile
?
Fixes MLPAB-1552