Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Unlimited programs should be opened for users #2514

Merged
merged 2 commits into from
Jul 12, 2021

Conversation

dchubar-fj
Copy link
Contributor

Problem/Motivation
Classes with an unlimited number of spots are displayed as completely filled in Activity Finder with the Daxko back-end. The root of the problem is that Open Y doesn't check the limited flag in the Daxko response. Daxko back-end relies on the available field in the response:

         "availability":{
            "limited":true,
            "full":false,
            "max":20,
            "taken":0,
            "available":20,
            "has_waiting_list":false
         },

But unlimited classes don't have the available field:

         "availability":{
            "limited":false,
            "full":false,
            "taken":0,
            "has_waiting_list":true,
            "waiting_list_count":0,
            "show_waiting_list_count":false
         },

As result, unlimited classes are not available for registration in the Activity Finder, because the Register button is disabled
Screenshot from 2021-07-08 18-12-46
But they are open for registration in Daxko
Screenshot from 2021-07-08 18-14-16

Steps for review

  • Find a class with unlimited spots in the Activity Finder with the Daxko back-end
  • Check program details
  • Verify the register button is not disabled

General checks

Thank you for your contribution!

@dchubar-fj dchubar-fj added PR: Needs Review Needs someone review ( code ) PR: Needs Testing Manual testing is needed Daxko Related to Daxko integration labels Jul 8, 2021
// Daxko doesn't provide a number of available spots for unlimited offers.
// But they should be open for users.
if ($availability_status === 'open' && !$spots_available && !$limited) {
$spots_available = 100;
Copy link
Contributor

Choose a reason for hiding this comment

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

let's keep this as a constant of the current class, please

@podarok
Copy link
Contributor

podarok commented Jul 8, 2021

@dchubar-fj could you put your description in module's readme.md?
Thank you

@gundevel
Copy link
Collaborator

gundevel commented Jul 8, 2021

Build comment file:

Check Open Y Installation Wizard at http://install.openy.cibox.tools/build3277/install.php


Test PASSed.
Refer to this link for build results (access rights to CI server needed):
http://openy.cibox.tools:8080/job/PR_BUILDER_COMPOSER/3277/

@gundevel
Copy link
Collaborator

gundevel commented Jul 8, 2021

Open Y Upgrade Path site check installed at http://upgrade.openy.cibox.tools/build3277/

Copy link
Contributor

@podarok podarok left a comment

Choose a reason for hiding this comment

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

Code looks good
Let's improve readme a bit @dchubar-fj

@gundevel
Copy link
Collaborator

gundevel commented Jul 9, 2021

Build comment file:

Check Open Y Installation Wizard at http://install.openy.cibox.tools/build3278/install.php


Test PASSed.
Refer to this link for build results (access rights to CI server needed):
http://openy.cibox.tools:8080/job/PR_BUILDER_COMPOSER/3278/

@gundevel
Copy link
Collaborator

gundevel commented Jul 9, 2021

Open Y Upgrade Path site check installed at http://upgrade.openy.cibox.tools/build3278/

@podarok podarok merged commit 41c0fbc into 9.x-2.x Jul 12, 2021
@podarok podarok deleted the fix-daxko-unlimited-programs branch July 12, 2021 09:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Daxko Related to Daxko integration PR: Needs Review Needs someone review ( code ) PR: Needs Testing Manual testing is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants