This patch adds an option "Limit items" to each content type that sets the maximum number of items of that type that can added to a single reservation. This is useful in certain situations, e.g. where an individual is only allowed to reserve items for his or herself, in which case the limit on most items would be "1".

This is against -beta2 but should work against -dev.

CommentFileSizeAuthor
merci-item_limit.patch9.68 KBdanepowell

Comments

darrick’s picture

Status: Needs review » Postponed

My vote is to hold off on new features until the current code base is fully tested.

kreynen’s picture

I agree. I think it's time to add a validation hook to MERCI and move more of these options to sub modules. The admin form is already long. We can't keep adding every option there.

I want to see MERCI should be stripped down to only handle the core validation. After merci_node_validate passes or fails, it would hand the user, item, start time, end time off to any module that implemented that hook... those would pass/fail and set their message.

There is a lot that's already in MERCI that could be pulled out like creating reservations outside hours of operation, push past weekends/closed, min/max, etc.

We used this structure in om_navigation. This would be a little more complicated it that the hook would need to be weighted and allow the sub modules to override merci_node_validate's fail if the fail is due to something other than an actual Bucket shortage or Resource conflict.

danepowell’s picture

@kreynen I think this sounds like a great idea - things are definitely getting a little too cluttered and haphazard when it comes to validation.

stefanwray’s picture

Is this feature of adding a limit to the number of items to 1 still postponed?

If so, what option is there for making sure that a user doesn't select two or more of the same camera when only one camera per checkout is allowed?

Just an internal policy forbidding it?

- Stefan