Bug 978871 - Ticket Monster: generated Administration section does not show Venue specific sections when creating or updating Shows
Ticket Monster: generated Administration section does not show Venue specific...
Product: JBoss Enterprise WFK Platform 2
Classification: JBoss
Component: TicketMonster (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: 2.4.0
Assigned To: Pete Muir
Tomas Repel
Depends On:
  Show dependency treegraph
Reported: 2013-06-27 05:12 EDT by Vineet Reynolds
Modified: 2013-07-29 11:44 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Known Issue
Doc Text:
When creating a new Show or updating an existing one, the Section drop down list in the TicketPrice field displays all Sections, not just those that are relevant for the selected Venue. Consequently, incorrect Sections can be selected and stored. To work around this issue, add the following methods to the ShowBean class: public List<Venue> getAllVenues() { CriteriaQuery<Venue> criteria = this.entityManager .getCriteriaBuilder().createQuery(Venue.class); List<Venue> allVenues = this.entityManager.createQuery( criteria.select(criteria.from(Venue.class))).getResultList(); Venue defaultVenue = allVenues.get(0); if(this.getSelectedVenue() == null && defaultVenue != null) { this.setSelectedVenue(defaultVenue); } return allVenues; } public void setSelectedVenue(Venue venue) { this.show.setVenue(venue); } public Venue getSelectedVenue() { return this.show.getVenue(); } public List<Section> getVenueSections() { Venue venue = getSelectedVenue(); if(venue == null || venue.getSections() == null) { return new ArrayList<Section>(); } else { return new ArrayList<Section>(venue.getSections()); } } public void changeSelectedVenue(ValueChangeEvent event) { Venue newVenue = (Venue) event.getNewValue(); Venue oldVenue = (Venue) event.getOldValue(); if(!oldVenue.equals(newVenue)) { this.show.getTicketPrices().clear(); } this.setSelectedVenue(newVenue); } Then replace the Venue selector widget in the src/main/webapp/admin/show/create.xhtml file with the following code: <h:selectOneMenu converter="#{venueBean.converter}" id="showBeanShowVenue" required="true" value="#{showBean.selectedVenue}" onchange="submit()" valueChangeListener="#{showBean.changeSelectedVenue}"> <f:selectItems value="#{showBean.allVenues}"/> </h:selectOneMenu> And finally replace the Section selector widget in the same file with the code below: <h:selectOneMenu converter="#{sectionBean.converter}" id="ticketPriceBeanAddSection" value="#{ticketPriceBean.add.section}"> <f:selectItems value="#{showBean.venueSections}"/> </h:selectOneMenu> As a result of applying this workaround, only Sections valid for the chosen Venue will be displayed.
Story Points: ---
Clone Of:
Last Closed: 2013-07-17 17:34:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JDF-389 Major Resolved Revise the Git patches of TicketMonster for Forge 1.3.2 2014-05-29 09:43:47 EDT
JBoss Issue Tracker WFK2-57 Major Closed Ticket Monster: generated Administration section does not show Venue specific sections when creating or updating Shows 2014-05-29 09:43:46 EDT

  None (edit)
Description Vineet Reynolds 2013-06-27 05:12:12 EDT
Description of problem:
When creating a new Show or updating an existing one, the Section dropdown in the TicketPrice field displays all sections, not just the sections for the selected Venue of the Show. This results in incorrect sections being stored when creating TicketPrices for a Show if they have been selected.

Version-Release number of selected component (if applicable):

How reproducible: Always

Steps to Reproduce:
1. Click the Show entry in the sidebar.
2. Click the 'Create New' button to create a new Show.
3. Click the Section dropdown menu in the TicketPrices field.

Actual results:

The Section dropdown shows all sections stored in the TicketMonster database.

Expected results:

The Section dropdown should show only the Sections for the selected Venue. If 'Sydney Opera House' is the venue, then the sections S1, S2, S3, S4 etc. should be displayed. Sections of unselected Venues should not be displayed.

Additional info:

This requires enhancement of the generated TicketMonster administration site, and is not a bug in Forge. It is fixed upstream via the TicketMonster Git patches.
Comment 3 Vineet Reynolds 2013-07-17 17:46:39 EDT
Migrated to JIRA
Comment 4 JBoss JIRA Server 2013-07-29 11:44:01 EDT
Vineet Reynolds <vineet.reynolds@gmail.com> made a comment on jira WFK2-57

This has a possibility of being no longer relevant, if we incorporate HTML5 scaffolding in WFK2-73 since this is a bug in the existing Faces scaffolding.

Note You need to log in before you can comment on or make changes to this bug.