Package com.gitblit.models.TicketModel

Examples of com.gitblit.models.TicketModel.Change.watch()


              public void onClick(AjaxRequestTarget target) {
                Status status = getModel().getObject();
                Change change = new Change(user.username);
                change.setField(Field.status, status);
                if (!ticket.isWatching(user.username)) {
                  change.watch(user.username);
                }
                TicketModel update = app().tickets().updateTicket(repository, ticket.number, change);
                app().tickets().createNotifier().sendMailing(update);
                setResponsePage(TicketsPage.class, getPageParameters());
              }
View Full Code Here


                TicketResponsible responsible = getModel().getObject();
                Change change = new Change(user.username);
                change.setField(Field.responsible, responsible.username);
                if (!StringUtils.isEmpty(responsible.username)) {
                  if (!ticket.isWatching(responsible.username)) {
                    change.watch(responsible.username);
                  }
                }
                if (!ticket.isWatching(user.username)) {
                  change.watch(user.username);
                }
View Full Code Here

                  if (!ticket.isWatching(responsible.username)) {
                    change.watch(responsible.username);
                  }
                }
                if (!ticket.isWatching(user.username)) {
                  change.watch(user.username);
                }
                TicketModel update = app().tickets().updateTicket(repository, ticket.number, change);
                app().tickets().createNotifier().sendMailing(update);
                setResponsePage(TicketsPage.class, getPageParameters());
              }
View Full Code Here

                  change.setField(Field.milestone, "");
                } else {
                  change.setField(Field.milestone, milestone.name);
                }
                if (!ticket.isWatching(user.username)) {
                  change.watch(user.username);
                }
                TicketModel update = app().tickets().updateTicket(repository, ticket.number, change);
                app().tickets().createNotifier().sendMailing(update);
                setResponsePage(TicketsPage.class, getPageParameters());
              }
View Full Code Here

        public void onClick(AjaxRequestTarget target) {
          Change change = new Change(user.username);
          if (ticket.isWatching(user.username)) {
            change.unwatch(user.username);
          } else {
            change.watch(user.username);
          }
          app().tickets().updateTicket(repository, ticket.number, change);
          setResponsePage(TicketsPage.class, getPageParameters());
        }
      };
View Full Code Here

    UserModel user = GitBlitWebSession.get().getUser();
    Patchset ps = ticket.getCurrentPatchset();
    Change change = new Change(user.username);
    change.review(ps, score, !ticket.isReviewer(user.username));
    if (!ticket.isWatching(user.username)) {
      change.watch(user.username);
    }
    TicketModel updatedTicket = app().tickets().updateTicket(getRepositoryModel(), ticket.number, change);
    app().tickets().createNotifier().sendMailing(updatedTicket);
    setResponsePage(TicketsPage.class, getPageParameters());
  }
View Full Code Here

        if (change == null) {
          // new comment
          Change newComment = new Change(user.username);
          newComment.comment(txt);
          if (!ticket.isWatching(user.username)) {
            newComment.watch(user.username);
          }
          RepositoryModel repository = app().repositories().getRepositoryModel(ticket.repository);
          TicketModel updatedTicket = app().tickets().updateTicket(repository, ticket.number, newComment);
          if (updatedTicket != null) {
            app().tickets().createNotifier().sendMailing(updatedTicket);
View Full Code Here

        if (responsible != null && !responsible.username.equals(ticket.responsible)) {
          // responsible change
          change.setField(Field.responsible, responsible.username);
          if (!StringUtils.isEmpty(responsible.username)) {
            if (!ticket.isWatching(responsible.username)) {
              change.watch(responsible.username);
            }
          }
        }

        TicketMilestone milestone = milestoneModel == null ? null : milestoneModel.getObject();
View Full Code Here

          change.setField(Field.mergeTo, mergeTo);
        }

        if (change.hasFieldChanges()) {
          if (!ticket.isWatching(createdBy)) {
            change.watch(createdBy);
          }
          ticket = app().tickets().updateTicket(getRepositoryModel(), ticket.number, change);
          if (ticket != null) {
            TicketNotifier notifier = app().tickets().createNotifier();
            notifier.sendMailing(ticket);
View Full Code Here

              public void onClick(AjaxRequestTarget target) {
                Status status = getModel().getObject();
                Change change = new Change(user.username);
                change.setField(Field.status, status);
                if (!ticket.isWatching(user.username)) {
                  change.watch(user.username);
                }
                TicketModel update = app().tickets().updateTicket(repository, ticket.number, change);
                app().tickets().createNotifier().sendMailing(update);
                setResponsePage(TicketsPage.class, getPageParameters());
              }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.