| | |
| | |
|
| | | private Label descriptionPreview;
|
| | |
|
| | | private IModel<TicketModel.Priority> priorityModel;
|
| | | |
| | | private IModel<TicketModel.Severity> severityModel;
|
| | |
|
| | | public NewTicketPage(PageParameters params) {
|
| | | super(params);
|
| | |
|
| | |
| | | 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);
|
| | |
| | | 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>();
|
| | |
| | | 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)) {
|