Rock icon indicating copy to clipboard operation
Rock copied to clipboard

Campus Schedule Type dropdown not loading options

Open MichaelAllen opened this issue 3 years ago • 0 comments

Prerequisites

  • [x] Put an X between the brackets on this line if you have done all of the following:
    • Did you perform a search at https://github.com/issues?q=is%3Aissue+user%3ASparkDevNetwork+-repo%3ARock to see if your bug or enhancement is already reported?
    • Can you reproduce the problem on a fresh install or the demo site?
    • Did you include your Rock version number and client culture setting?

A Picture Is worth a Thousand Words

DefinedValue CampusEdit

Description

The campus editor block is not correctly loading the values for the defined values picker for campus schedule types. I am only seeing the default "Weekend Service" even though I've added an additional option to the defined type.

Steps to Reproduce

  1. Add a new item to the "Schedule Type" defined type
  2. Edit a campus under General Settings > Campuses
  3. Add a new item to the "Campus Schedules" list
  4. Try to select your newly added schedule type

Expected behavior:

The "Schedule Type" dropdown correctly loads the values from the defined type.

Actual behavior:

No values are loaded. Only the default value is present in the list.

Proposed Solution

It looks like the pickers are loaded in LoadDropDowns which is called by ShowEditDetailsbut the picker isn't on the screen at that point.

I think that it needs to instead be loaded in ShowCampusScheduleEdit. Similar to how the topics are loaded in ShowCampusTopicEdit

Schedule: https://github.com/SparkDevNetwork/Rock/blob/f317c12f0944bdb79f694e1e2fa940579a3f0ac2/RockWeb/Blocks/Core/CampusDetail.ascx.cs#L1027-L1030

Topic: https://github.com/SparkDevNetwork/Rock/blob/f317c12f0944bdb79f694e1e2fa940579a3f0ac2/RockWeb/Blocks/Core/CampusDetail.ascx.cs#L1050-L1054

I'll test this proposed fix this afternoon and send a PR if it works.

Versions

  • Rock Version: v1.13.6
  • Client Culture Setting: en-US

MichaelAllen avatar Aug 21 '22 21:08 MichaelAllen