Bug 978871

Summary: Ticket Monster: generated Administration section does not show Venue specific sections when creating or updating Shows
Product: [Retired] JBoss Enterprise WFK Platform 2 Reporter: Vineet Reynolds <vpereira>
Component: TicketMonsterAssignee: Pete Muir <pmuir>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Tomas Repel <trepel>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.3.0CC: bsutter, mnovotny, myarboro, ppenicka
Target Milestone: ---   
Target Release: 2.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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: Environment:
Last Closed: 2013-07-17 21:34:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vineet Reynolds 2013-06-27 09:12:12 UTC
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 21:46:39 UTC
Migrated to JIRA

Comment 4 JBoss JIRA Server 2013-07-29 15:44:01 UTC
Vineet Reynolds <vineet.reynolds> 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.