Prevent Recursion & Cycles in Bundles Lodge Stays GH2272
[Kevin] A bundled night has a "qualifying purchase" and an "add-on".
You should not be able to chain bundled nights together. This is pretty easy to fix: If a relationship exists, show it on both. The relationship should only be editable from the add-on item, and should be displayed in a read-only manner on the qualifying purchaser.
Friday 1/6 (editable) -> Saturday1/7 (read-only)
Saturday1/7 -> Friday 1/14 <--- not allowed, b/c Saturday 1/7 has a relationship already
Friday 1/14 -> Friday 1/6 <---- not allowed, b/c Friday 1/6 has a relationship already
[Jeff} There are probably two parts to this:
The Bundling Process: I think it may be best to have an error message on the edit form of a stay that is already bundled. Example: On Fri 1/1 stay, add St 1/2 stay as a bundled stay. On Sat, get an error saying it’s already bundled and what it’s bundle with if you try to bundle it with anything. Does this sound right?
What do we show on the lodge stay detail page for a stay that has been bundled? In the example here, the Fri 1/1 stay will say that the Sat 1/2 stay is bundled and will be automatically added. What do we want to show on the Sat 1/2 detail page, if anything? Though we’re probably only going to two consecutive night bundled, we have allowed for more. That could make messaging a bit complicated for this part of the bundle (unless we limit bundles to only one other lodge stay).