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: | TicketMonster | Assignee: | Pete Muir <pmuir> |
Status: | CLOSED INSUFFICIENT_DATA | QA Contact: | Tomas Repel <trepel> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 2.3.0 | CC: | 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
Migrated to JIRA |