sapmentors / SITregParticipant

SAP Event Registration - Front end for Participants
Apache License 2.0
3 stars 11 forks source link

Registration not possible when form was called with Event# directly #28

Closed gregorwolf closed 6 years ago

gregorwolf commented 6 years ago

Move issue from https://github.com/sapmentors/SITreg/issues/48 to the correct project:

Sending the registration form (e.g. Event in Frankfurt 21.10.2017) is not possible when using the direkt link to the event:

https://sitregparticipant-a5a504e08.dispatcher.hana.ondemand.com/#/Events/30 leads to the list of registered participants [thats ok] but the button (lower right corner) is named "Bearbeiten" / "Edit" instead of "Register" It then leads to the empty(!) registration form and looks fine, but when saving all the entered data the processing ends with the three circles of death and never comes to an end.

When choosing the event once again from the navigation-panel out of all events .. then the button is correctly named "Register" and all work fine. The name and email is already filled into the form (taken from the S-ID)

See Slack:SAPMentors#sitreg for details

Issue reported there by Hendrik Video and further descriotion by Sebastian I tried to find the part where the logic fails in the sourcecode .. maybe in this section the wrong path is entered? https://github.com/sapmentors/SITregParticipant/blob/f283fbc0b0ad1bc63b28f1a4443aea22e8ab25e6/webapp/view/Detail.view.xml#L96

gregorwolf commented 6 years ago

Found the root cause:

In webapp/view/Master.view.xml we use:

expand:'RegistrationNumbers,Participant,Ticket,EventType'

to read the registration status of the participant. When the number of shown events exceeds 20 which is the default limit then the registration details aren't read anymore.

In webapp/controller/Detail.controller.js we use already:

this._bindView("/" + sObjectPath, {expand: "Participant"} );

but that seems not to work. As a quick fix I've changed the visibility of past events to invisible.

CBasis commented 6 years ago

Thanks @wolf_gregor!!!! It works fine for me and I was able to register. The [Register] button was now available .. and further processing was fine.

Just my 5 cents:

abshoff-reply commented 6 years ago

@gregorwolf: You are right, that's the problem.

In the detail controller, the function this._bindView is called with a second argument containing the expand. However, the second argument is not passed to the bindElement call in _bindView. That's why the navigation property "Participant" is not available. It is only available if it has already been loaded in the master view - which is why it is only working if the element part of the initial load in the master view.

Just pass the expand parameter to bindElement and everything should be fine.