Paul Martin
2014-09-29 f9c78c0ccc709509cdf7f83c45c898883d329db2
src/main/java/com/gitblit/wicket/pages/NewTicketPage.java
@@ -76,6 +76,10 @@
   private Label descriptionPreview;
   private IModel<TicketModel.Priority> priorityModel;
   private IModel<TicketModel.Severity> severityModel;
   public NewTicketPage(PageParameters params) {
      super(params);
@@ -95,6 +99,8 @@
      mergeToModel = Model.of(Repository.shortenRefName(getRepositoryModel().mergeTo));
      responsibleModel = Model.of();
      milestoneModel = Model.of();
      severityModel = Model.of(TicketModel.Severity.defaultSeverity);
      priorityModel = Model.of(TicketModel.Priority.defaultPriority);
      setStatelessHint(false);
      setOutputMarkupId(true);
@@ -151,6 +157,12 @@
         Fragment milestone = new Fragment("milestone", "milestoneFragment", this);
         milestone.add(new DropDownChoice<TicketMilestone>("milestone", milestoneModel, milestones));
         form.add(milestone.setVisible(!milestones.isEmpty()));
         // priority
         form.add(new DropDownChoice<TicketModel.Priority>("priority", priorityModel, Arrays.asList(TicketModel.Priority.choices())));
         //severity
         form.add(new DropDownChoice<TicketModel.Severity>("severity", severityModel, Arrays.asList(TicketModel.Severity.choices())));
         // integration branch
         List<String> branches = new ArrayList<String>();
@@ -212,6 +224,20 @@
               change.setField(Field.milestone, milestone.name);
            }
            // severity
            TicketModel.Severity severity = TicketModel.Severity.defaultSeverity;
            if (severityModel.getObject() != null) {
               severity = severityModel.getObject();
            }
            change.setField(Field.severity, severity);
            // priority
            TicketModel.Priority priority = TicketModel.Priority.defaultPriority;
            if (priorityModel.getObject() != null) {
               priority = priorityModel.getObject();
            }
            change.setField(Field.priority, priority);
            // integration branch
            String mergeTo = mergeToModel.getObject();
            if (!StringUtils.isEmpty(mergeTo)) {