| | |
| | |
|
| | | import com.gitblit.Constants;
|
| | | import com.gitblit.Constants.AccessPermission;
|
| | | import com.gitblit.Constants.AuthorizationControl;
|
| | | import com.gitblit.Keys;
|
| | | import com.gitblit.git.PatchsetCommand;
|
| | | import com.gitblit.git.PatchsetReceivePack;
|
| | |
| | | } else {
|
| | | // link to milestone query
|
| | | TicketMilestone milestone = app().tickets().getMilestone(repository, ticket.milestone);
|
| | | PageParameters milestoneParameters = new PageParameters();
|
| | | milestoneParameters.put("r", repositoryName);
|
| | | PageParameters milestoneParameters;
|
| | | if (milestone.isOpen()) {
|
| | | milestoneParameters = WicketUtils.newOpenTicketsParameter(repositoryName);
|
| | | } else {
|
| | | milestoneParameters = WicketUtils.newRepositoryParameter(repositoryName);
|
| | | }
|
| | | milestoneParameters.put(Lucene.milestone.name(), ticket.milestone);
|
| | | int progress = 0;
|
| | | int open = 0;
|
| | |
| | | if (StringUtils.isEmpty(ticket.body)) {
|
| | | desc = getString("gb.noDescriptionGiven");
|
| | | } else {
|
| | | desc = MarkdownUtils.transformGFM(app().settings(), ticket.body, ticket.repository);
|
| | | String bugtraq = bugtraqProcessor().processText(getRepository(), repositoryName, ticket.body);
|
| | | desc = MarkdownUtils.transformGFM(app().settings(), bugtraq, ticket.repository);
|
| | | }
|
| | | add(new Label("ticketDescription", desc).setEscapeModelStrings(false));
|
| | |
|
| | |
| | | * RESPONSIBLE LIST
|
| | | */
|
| | | Set<String> userlist = new TreeSet<String>(ticket.getParticipants());
|
| | | for (RegistrantAccessPermission rp : app().repositories().getUserAccessPermissions(getRepositoryModel())) {
|
| | | if (rp.permission.atLeast(AccessPermission.PUSH) && !rp.isTeam()) {
|
| | | userlist.add(rp.registrant);
|
| | | if (UserModel.ANONYMOUS.canPush(getRepositoryModel())
|
| | | || AuthorizationControl.AUTHENTICATED == getRepositoryModel().authorizationControl) {
|
| | | // authorization is ANONYMOUS or AUTHENTICATED (i.e. all users can be set responsible)
|
| | | userlist.addAll(app().users().getAllUsernames());
|
| | | } else {
|
| | | // authorization is by NAMED users (users with PUSH permission can be set responsible)
|
| | | for (RegistrantAccessPermission rp : app().repositories().getUserAccessPermissions(getRepositoryModel())) {
|
| | | if (rp.permission.atLeast(AccessPermission.PUSH)) {
|
| | | userlist.add(rp.registrant);
|
| | | }
|
| | | }
|
| | | }
|
| | | List<TicketResponsible> responsibles = new ArrayList<TicketResponsible>();
|
| | |
| | | add(new Label("ticketTopic").setVisible(false));
|
| | | } else {
|
| | | // process the topic using the bugtraq config to link things
|
| | | String topic = bugtraqProcessor().processPlainCommitMessage(getRepository(), repositoryName, ticket.topic);
|
| | | String topic = bugtraqProcessor().processText(getRepository(), repositoryName, ticket.topic);
|
| | | add(new Label("ticketTopic", topic).setEscapeModelStrings(false));
|
| | | }
|
| | |
|
| | |
| | | /*
|
| | | * COMMENT
|
| | | */
|
| | | String comment = MarkdownUtils.transformGFM(app().settings(), entry.comment.text, repositoryName);
|
| | | String bugtraq = bugtraqProcessor().processText(getRepository(), repositoryName, entry.comment.text);
|
| | | String comment = MarkdownUtils.transformGFM(app().settings(), bugtraq, repositoryName);
|
| | | Fragment frag = new Fragment("entry", "commentFragment", this);
|
| | | Label commentIcon = new Label("commentIcon");
|
| | | if (entry.comment.src == CommentSource.Email) {
|