
issue: Feature move posting to issue
@8e32e173ecbf9d0a15cc4dcb0d98da5efbce9884
--- app/controllers/BoardApp.java
+++ app/controllers/BoardApp.java
... | ... | @@ -386,7 +386,7 @@ |
386 | 386 |
} |
387 | 387 |
|
388 | 388 |
/** |
389 |
- * @see controllers.AbstractPostingApp#saveComment(models.Comment, play.data.Form, play.mvc.Call, Runnable) |
|
389 |
+ * @see controllers.AbstractPostingApp#saveComment(Comment comment, Runnable containerUpdater) |
|
390 | 390 |
*/ |
391 | 391 |
@Transactional |
392 | 392 |
@IsAllowed(value = Operation.READ, resourceType = ResourceType.BOARD_POST) |
--- app/controllers/api/IssueApi.java
+++ app/controllers/api/IssueApi.java
... | ... | @@ -7,20 +7,66 @@ |
7 | 7 |
|
8 | 8 |
package controllers.api; |
9 | 9 |
|
10 |
+import static controllers.UserApp.*; |
|
11 |
+import static controllers.api.UserApi.*; |
|
12 |
+import static play.libs.Json.*; |
|
13 |
+ |
|
14 |
+import java.io.IOException; |
|
15 |
+import java.text.DateFormat; |
|
16 |
+import java.text.ParseException; |
|
17 |
+import java.text.SimpleDateFormat; |
|
18 |
+import java.util.ArrayList; |
|
19 |
+import java.util.Arrays; |
|
20 |
+import java.util.Collection; |
|
21 |
+import java.util.Comparator; |
|
22 |
+import java.util.Date; |
|
23 |
+import java.util.HashMap; |
|
24 |
+import java.util.HashSet; |
|
25 |
+import java.util.List; |
|
26 |
+import java.util.Locale; |
|
27 |
+import java.util.Map; |
|
28 |
+import java.util.Objects; |
|
29 |
+import java.util.Optional; |
|
30 |
+import java.util.Set; |
|
31 |
+import java.util.stream.Collectors; |
|
32 |
+import java.util.stream.Stream; |
|
33 |
+import javax.annotation.Nonnull; |
|
34 |
+ |
|
35 |
+import org.apache.commons.codec.digest.DigestUtils; |
|
36 |
+import org.apache.commons.lang3.StringUtils; |
|
37 |
+ |
|
10 | 38 |
import com.avaje.ebean.ExpressionList; |
11 | 39 |
import com.fasterxml.jackson.databind.JsonNode; |
12 | 40 |
import com.fasterxml.jackson.databind.node.ArrayNode; |
13 | 41 |
import com.fasterxml.jackson.databind.node.ObjectNode; |
42 |
+ |
|
14 | 43 |
import controllers.AbstractPostingApp; |
15 | 44 |
import controllers.UserApp; |
16 | 45 |
import controllers.annotation.AnonymousCheck; |
17 | 46 |
import controllers.annotation.IsAllowed; |
18 | 47 |
import controllers.annotation.IsCreatable; |
19 | 48 |
import controllers.routes; |
20 |
-import models.*; |
|
21 |
-import models.enumeration.*; |
|
22 |
-import org.apache.commons.codec.digest.DigestUtils; |
|
23 |
-import org.apache.commons.lang3.StringUtils; |
|
49 |
+import models.Assignee; |
|
50 |
+import models.Attachment; |
|
51 |
+import models.Comment; |
|
52 |
+import models.Issue; |
|
53 |
+import models.IssueComment; |
|
54 |
+import models.IssueEvent; |
|
55 |
+import models.IssueLabel; |
|
56 |
+import models.IssueSharer; |
|
57 |
+import models.Milestone; |
|
58 |
+import models.NotificationEvent; |
|
59 |
+import models.Posting; |
|
60 |
+import models.PostingComment; |
|
61 |
+import models.Project; |
|
62 |
+import models.ProjectUser; |
|
63 |
+import models.User; |
|
64 |
+import models.enumeration.EventType; |
|
65 |
+import models.enumeration.Operation; |
|
66 |
+import models.enumeration.ProjectScope; |
|
67 |
+import models.enumeration.ResourceType; |
|
68 |
+import models.enumeration.State; |
|
69 |
+import models.enumeration.UserState; |
|
24 | 70 |
import play.api.mvc.Codec; |
25 | 71 |
import play.db.ebean.Transactional; |
26 | 72 |
import play.i18n.Messages; |
... | ... | @@ -29,19 +75,11 @@ |
29 | 75 |
import play.libs.ws.WS; |
30 | 76 |
import play.mvc.Http; |
31 | 77 |
import play.mvc.Result; |
32 |
-import utils.*; |
|
33 |
- |
|
34 |
-import javax.annotation.Nonnull; |
|
35 |
-import java.io.IOException; |
|
36 |
-import java.text.DateFormat; |
|
37 |
-import java.text.ParseException; |
|
38 |
-import java.text.SimpleDateFormat; |
|
39 |
-import java.util.*; |
|
40 |
- |
|
41 |
-import static controllers.UserApp.MAX_FETCH_USERS; |
|
42 |
-import static controllers.UserApp.currentUser; |
|
43 |
-import static controllers.api.UserApi.*; |
|
44 |
-import static play.libs.Json.toJson; |
|
78 |
+import utils.AccessControl; |
|
79 |
+import utils.ErrorViews; |
|
80 |
+import utils.JodaDateUtil; |
|
81 |
+import utils.Markdown; |
|
82 |
+import utils.RouteUtil; |
|
45 | 83 |
|
46 | 84 |
public class IssueApi extends AbstractPostingApp { |
47 | 85 |
public static String TRANSLATION_API = play.Configuration.root().getString("application.extras.translation.api", ""); |
... | ... | @@ -49,6 +87,111 @@ |
49 | 87 |
public static String TRANSLATION_SVCID = play.Configuration.root().getString("application.extras.translation.svcid", ""); |
50 | 88 |
|
51 | 89 |
@Transactional |
90 |
+ public static Result imports(String owner, String projectName) { |
|
91 |
+ Project project = Project.findByOwnerAndProjectName(owner, projectName); |
|
92 |
+ |
|
93 |
+ try { |
|
94 |
+ String postNumber = request().getQueryString("postNumber"); |
|
95 |
+ Long number = Optional.ofNullable(postNumber) |
|
96 |
+ .map(Long::parseLong) |
|
97 |
+ .orElseThrow(NumberFormatException::new); |
|
98 |
+ |
|
99 |
+ Posting posting = Posting.findByNumber(project, number); |
|
100 |
+ |
|
101 |
+ |
|
102 |
+ Issue issue = Issue.from(posting); |
|
103 |
+ issue.save(); |
|
104 |
+ |
|
105 |
+ Map<String, String> postingCommentIdToIssueCommentIdMap = copyCommentsToIssue(posting.comments, issue); |
|
106 |
+ copyAttachmentsToIssue(posting, issue); |
|
107 |
+ copyAttachmentsToIssueComments(postingCommentIdToIssueCommentIdMap); |
|
108 |
+ |
|
109 |
+ removePosting(posting); |
|
110 |
+ |
|
111 |
+ ObjectNode json = Json.newObject(); |
|
112 |
+ json.put("number", issue.getNumber()); |
|
113 |
+ |
|
114 |
+ return ok(json); |
|
115 |
+ } catch (NumberFormatException numberFormatException) { |
|
116 |
+ String errorMessage = String.format("IssueApi.imports() error with NumberFormatException. owner: %s, projectName: %s - ", owner, projectName); |
|
117 |
+ play.Logger.error(errorMessage, numberFormatException); |
|
118 |
+ } |
|
119 |
+ |
|
120 |
+ return badRequest(); |
|
121 |
+ } |
|
122 |
+ |
|
123 |
+ private static void copyAttachmentsToIssue(Posting from, Issue to) { |
|
124 |
+ List<Attachment> attachments = Attachment.findByContainer(ResourceType.BOARD_POST, String.valueOf(from.id)); |
|
125 |
+ attachments.forEach(attachment -> { |
|
126 |
+ Attachment newAttachment = Attachment.copyAs(attachment); |
|
127 |
+ newAttachment.containerId = String.valueOf(to.id); |
|
128 |
+ newAttachment.containerType = ResourceType.ISSUE_POST; |
|
129 |
+ newAttachment.save(); |
|
130 |
+ attachment.delete(); |
|
131 |
+ }); |
|
132 |
+ } |
|
133 |
+ |
|
134 |
+ private static void copyAttachmentsToIssueComments(Map<String, String> postingCommentIdToIssueCommentIdMap) { |
|
135 |
+ List<Attachment> attachments = postingCommentIdToIssueCommentIdMap.keySet().stream() |
|
136 |
+ .flatMap(postingCommentId -> Attachment.findByContainer(ResourceType.NONISSUE_COMMENT, String.valueOf(postingCommentId)).stream()) |
|
137 |
+ .collect(Collectors.toList()); |
|
138 |
+ |
|
139 |
+ attachments.forEach(attachment -> { |
|
140 |
+ String containerId = postingCommentIdToIssueCommentIdMap.get(attachment.containerId); |
|
141 |
+ |
|
142 |
+ Attachment newAttachment = Attachment.copyAs(attachment); |
|
143 |
+ newAttachment.containerId = containerId; |
|
144 |
+ newAttachment.containerType = ResourceType.ISSUE_COMMENT; |
|
145 |
+ newAttachment.save(); |
|
146 |
+ attachment.delete(); |
|
147 |
+ }); |
|
148 |
+ } |
|
149 |
+ |
|
150 |
+ private static void removePosting(Posting posting) { |
|
151 |
+ posting.deleteOnly(); |
|
152 |
+ } |
|
153 |
+ |
|
154 |
+ private static Map<String, String> copyCommentsToIssue(Collection<PostingComment> postingComments, Issue issue) { |
|
155 |
+ // 최상위 댓글 |
|
156 |
+ List<PostingComment> topLevelPostingComments = postingComments.stream() |
|
157 |
+ .filter(postingComment -> Objects.isNull(postingComment.getParentComment())) |
|
158 |
+ .collect(Collectors.toList()); |
|
159 |
+ |
|
160 |
+ // 대댓글 |
|
161 |
+ List<PostingComment> secondLevelPostingComments = postingComments.stream() |
|
162 |
+ .filter(postingComment -> Objects.nonNull(postingComment.getParentComment())) |
|
163 |
+ .collect(Collectors.toList()); |
|
164 |
+ |
|
165 |
+ // 최상위 댓글의 postingCommentId와 새로 생성될 issueCommentId의 mapping |
|
166 |
+ // XXX: id는 Long 타입이지만, parentId는 String 타입이다. |
|
167 |
+ Map<String, String> postingCommentIdToIssueCommentIdMap = new HashMap<>(); |
|
168 |
+ |
|
169 |
+ // 최상위 댓글을 issueComment에 생성하고, 이때 발급된 issueCommentId를 보관한다. |
|
170 |
+ List<IssueComment> issueComments = new ArrayList<>(); |
|
171 |
+ topLevelPostingComments.forEach(topLevelPostingComment -> { |
|
172 |
+ IssueComment issueComment = IssueComment.from(topLevelPostingComment, issue); |
|
173 |
+ issueComment.save(); |
|
174 |
+ postingCommentIdToIssueCommentIdMap.put(String.valueOf(topLevelPostingComment.id), String.valueOf(issueComment.id)); |
|
175 |
+ |
|
176 |
+ issueComments.add(issueComment); |
|
177 |
+ }); |
|
178 |
+ |
|
179 |
+ // 대댓글을 issueComment에 생성하고, 이때 새로 발급된 issueCommentId를 parentCommentId에 넣어준다. |
|
180 |
+ secondLevelPostingComments.forEach(secondLevelPostingComment -> { |
|
181 |
+ String parentCommentId = postingCommentIdToIssueCommentIdMap.get(String.valueOf(secondLevelPostingComment.getParentComment().id)); |
|
182 |
+ |
|
183 |
+ IssueComment issueComment = IssueComment.from(secondLevelPostingComment, issue); |
|
184 |
+ issueComment.parentCommentId = parentCommentId; |
|
185 |
+ issueComment.setParentComment(IssueComment.find.byId(Long.valueOf(parentCommentId))); |
|
186 |
+ issueComment.save(); |
|
187 |
+ |
|
188 |
+ issueComments.add(issueComment); |
|
189 |
+ }); |
|
190 |
+ |
|
191 |
+ return postingCommentIdToIssueCommentIdMap; |
|
192 |
+ } |
|
193 |
+ |
|
194 |
+ @Transactional |
|
52 | 195 |
public static Result updateIssueLabel(String owner, String projectName, Long number) { |
53 | 196 |
JsonNode json = request().body().asJson(); |
54 | 197 |
if(json == null) { |
--- app/models/AbstractPosting.java
+++ app/models/AbstractPosting.java
... | ... | @@ -228,6 +228,10 @@ |
228 | 228 |
super.delete(); |
229 | 229 |
} |
230 | 230 |
|
231 |
+ public void deleteOnly() { |
|
232 |
+ super.delete(); |
|
233 |
+ } |
|
234 |
+ |
|
231 | 235 |
public void updateProperties() { |
232 | 236 |
// default implementation for convenience |
233 | 237 |
} |
--- app/models/Attachment.java
+++ app/models/Attachment.java
... | ... | @@ -602,4 +602,17 @@ |
602 | 602 |
} |
603 | 603 |
return uploads; |
604 | 604 |
} |
605 |
+ |
|
606 |
+ public static Attachment copyAs(Attachment other) { |
|
607 |
+ Attachment attachment = new Attachment(); |
|
608 |
+ attachment.name = other.name; |
|
609 |
+ attachment.hash = other.hash; |
|
610 |
+ attachment.containerType = other.containerType; |
|
611 |
+ attachment.mimeType = other.mimeType; |
|
612 |
+ attachment.size = other.size; |
|
613 |
+ attachment.containerId = other.containerId; |
|
614 |
+ attachment.createdDate = other.createdDate; |
|
615 |
+ attachment.ownerLoginId = other.ownerLoginId; |
|
616 |
+ return attachment; |
|
617 |
+ } |
|
605 | 618 |
} |
--- app/models/Issue.java
+++ app/models/Issue.java
... | ... | @@ -6,40 +6,63 @@ |
6 | 6 |
**/ |
7 | 7 |
package models; |
8 | 8 |
|
9 |
+import java.io.ByteArrayOutputStream; |
|
10 |
+import java.io.IOException; |
|
11 |
+import java.text.SimpleDateFormat; |
|
12 |
+import java.util.ArrayList; |
|
13 |
+import java.util.Collections; |
|
14 |
+import java.util.Date; |
|
15 |
+import java.util.HashSet; |
|
16 |
+import java.util.LinkedHashSet; |
|
17 |
+import java.util.List; |
|
18 |
+import java.util.Map; |
|
19 |
+import java.util.Set; |
|
20 |
+import java.util.regex.Pattern; |
|
21 |
+import javax.persistence.CascadeType; |
|
22 |
+import javax.persistence.Entity; |
|
23 |
+import javax.persistence.FetchType; |
|
24 |
+import javax.persistence.JoinColumn; |
|
25 |
+import javax.persistence.JoinTable; |
|
26 |
+import javax.persistence.ManyToMany; |
|
27 |
+import javax.persistence.ManyToOne; |
|
28 |
+import javax.persistence.OneToMany; |
|
29 |
+import javax.persistence.OneToOne; |
|
30 |
+import javax.persistence.Table; |
|
31 |
+import javax.persistence.Transient; |
|
32 |
+import javax.persistence.UniqueConstraint; |
|
33 |
+ |
|
34 |
+import org.apache.commons.lang3.StringUtils; |
|
35 |
+import org.apache.commons.lang3.time.DateUtils; |
|
36 |
+import org.apache.shiro.util.CollectionUtils; |
|
37 |
+ |
|
9 | 38 |
import com.avaje.ebean.Ebean; |
10 | 39 |
import com.avaje.ebean.ExpressionList; |
11 | 40 |
import com.avaje.ebean.Page; |
12 | 41 |
import com.avaje.ebean.annotation.Formula; |
13 |
-import controllers.routes; |
|
42 |
+ |
|
14 | 43 |
import jxl.Workbook; |
15 | 44 |
import jxl.format.Alignment; |
16 | 45 |
import jxl.format.Border; |
17 | 46 |
import jxl.format.BorderLineStyle; |
18 | 47 |
import jxl.format.Colour; |
19 |
-import jxl.format.*; |
|
48 |
+import jxl.format.ScriptStyle; |
|
49 |
+import jxl.format.UnderlineStyle; |
|
20 | 50 |
import jxl.format.VerticalAlignment; |
21 |
-import jxl.write.*; |
|
51 |
+import jxl.write.DateFormat; |
|
52 |
+import jxl.write.WritableCellFormat; |
|
53 |
+import jxl.write.WritableFont; |
|
54 |
+import jxl.write.WritableSheet; |
|
55 |
+import jxl.write.WritableWorkbook; |
|
56 |
+import jxl.write.WriteException; |
|
22 | 57 |
import models.enumeration.ResourceType; |
23 | 58 |
import models.enumeration.State; |
24 | 59 |
import models.resource.Resource; |
25 | 60 |
import models.support.SearchCondition; |
26 |
-import org.apache.commons.lang3.StringUtils; |
|
27 |
-import org.apache.commons.lang3.time.DateUtils; |
|
28 |
-import org.apache.shiro.util.CollectionUtils; |
|
29 | 61 |
import play.data.Form; |
30 | 62 |
import play.data.format.Formats; |
31 | 63 |
import play.db.ebean.Model.Finder; |
32 | 64 |
import play.i18n.Messages; |
33 | 65 |
import utils.JodaDateUtil; |
34 |
- |
|
35 |
-import javax.persistence.*; |
|
36 |
-import java.io.ByteArrayOutputStream; |
|
37 |
-import java.io.IOException; |
|
38 |
-import java.lang.Boolean; |
|
39 |
-import java.text.SimpleDateFormat; |
|
40 |
-import java.util.*; |
|
41 |
-import java.util.regex.Pattern; |
|
42 |
-import java.util.regex.Pattern; |
|
43 | 66 |
|
44 | 67 |
@Entity |
45 | 68 |
@Table(uniqueConstraints = @UniqueConstraint(columnNames = {"project_id", "number"})) |
... | ... | @@ -717,4 +740,20 @@ |
717 | 740 |
.eq("state", State.OPEN) |
718 | 741 |
.findRowCount(); |
719 | 742 |
} |
743 |
+ |
|
744 |
+ public static Issue from(Posting posting) { |
|
745 |
+ Issue issue = new Issue(); |
|
746 |
+ |
|
747 |
+ issue.title = posting.title; |
|
748 |
+ issue.body = posting.body; |
|
749 |
+ issue.history = posting.history; |
|
750 |
+ issue.createdDate = posting.createdDate; |
|
751 |
+ issue.updatedDate = posting.updatedDate; |
|
752 |
+ issue.authorId = posting.authorId; |
|
753 |
+ issue.authorLoginId = posting.authorLoginId; |
|
754 |
+ issue.authorName = posting.authorName; |
|
755 |
+ issue.project = posting.project; |
|
756 |
+ |
|
757 |
+ return issue; |
|
758 |
+ } |
|
720 | 759 |
} |
--- app/models/IssueComment.java
+++ app/models/IssueComment.java
... | ... | @@ -20,14 +20,21 @@ |
20 | 20 |
*/ |
21 | 21 |
package models; |
22 | 22 |
|
23 |
-import models.enumeration.ResourceType; |
|
24 |
-import models.resource.Resource; |
|
25 |
- |
|
26 |
-import javax.persistence.*; |
|
27 | 23 |
import java.util.ArrayList; |
24 |
+import java.util.Collection; |
|
28 | 25 |
import java.util.HashSet; |
29 | 26 |
import java.util.List; |
30 | 27 |
import java.util.Set; |
28 |
+import javax.persistence.CascadeType; |
|
29 |
+import javax.persistence.Entity; |
|
30 |
+import javax.persistence.JoinColumn; |
|
31 |
+import javax.persistence.JoinTable; |
|
32 |
+import javax.persistence.ManyToMany; |
|
33 |
+import javax.persistence.ManyToOne; |
|
34 |
+import javax.persistence.OneToOne; |
|
35 |
+ |
|
36 |
+import models.enumeration.ResourceType; |
|
37 |
+import models.resource.Resource; |
|
31 | 38 |
|
32 | 39 |
@Entity |
33 | 40 |
public class IssueComment extends Comment { |
... | ... | @@ -135,4 +142,30 @@ |
135 | 142 |
update(); |
136 | 143 |
} |
137 | 144 |
} |
145 |
+ |
|
146 |
+ public static IssueComment from(PostingComment postingComment, Issue issue) { |
|
147 |
+ User user = new User(); |
|
148 |
+ user.id = postingComment.authorId; |
|
149 |
+ user.loginId = postingComment.authorLoginId; |
|
150 |
+ user.name = postingComment.authorName; |
|
151 |
+ |
|
152 |
+ String contents = postingComment.contents; |
|
153 |
+ |
|
154 |
+ IssueComment issueComment = new IssueComment(issue, user, contents); |
|
155 |
+ issueComment.createdDate = postingComment.createdDate; |
|
156 |
+ issueComment.authorId = postingComment.authorId; |
|
157 |
+ issueComment.authorLoginId = postingComment.authorLoginId; |
|
158 |
+ issueComment.authorName = postingComment.authorName; |
|
159 |
+ issueComment.projectId = postingComment.projectId; |
|
160 |
+ return issueComment; |
|
161 |
+ } |
|
162 |
+ |
|
163 |
+ public static List<IssueComment> from(Collection<PostingComment> postingComments, Issue issue) { |
|
164 |
+ List<IssueComment> issueComments = new ArrayList<>(); |
|
165 |
+ for (PostingComment postingComment : postingComments) { |
|
166 |
+ issueComments.add(IssueComment.from(postingComment, issue)); |
|
167 |
+ } |
|
168 |
+ |
|
169 |
+ return issueComments; |
|
170 |
+ } |
|
138 | 171 |
} |
--- app/models/Posting.java
+++ app/models/Posting.java
... | ... | @@ -4,17 +4,25 @@ |
4 | 4 |
|
5 | 5 |
package models; |
6 | 6 |
|
7 |
-import models.enumeration.ResourceType; |
|
8 |
-import models.resource.Resource; |
|
9 |
-import utils.JodaDateUtil; |
|
7 |
+import static com.avaje.ebean.Expr.*; |
|
10 | 8 |
|
11 |
-import javax.persistence.*; |
|
12 | 9 |
import java.util.Collections; |
13 | 10 |
import java.util.HashSet; |
14 | 11 |
import java.util.List; |
15 | 12 |
import java.util.Set; |
13 |
+import javax.persistence.CascadeType; |
|
14 |
+import javax.persistence.Entity; |
|
15 |
+import javax.persistence.FetchType; |
|
16 |
+import javax.persistence.ManyToMany; |
|
17 |
+import javax.persistence.OneToMany; |
|
18 |
+import javax.persistence.OneToOne; |
|
19 |
+import javax.persistence.Table; |
|
20 |
+import javax.persistence.Transient; |
|
21 |
+import javax.persistence.UniqueConstraint; |
|
16 | 22 |
|
17 |
-import static com.avaje.ebean.Expr.eq; |
|
23 |
+import models.enumeration.ResourceType; |
|
24 |
+import models.resource.Resource; |
|
25 |
+import utils.JodaDateUtil; |
|
18 | 26 |
|
19 | 27 |
@Entity |
20 | 28 |
@Table(uniqueConstraints = @UniqueConstraint(columnNames = {"project_id", "number"})) |
... | ... | @@ -159,4 +167,20 @@ |
159 | 167 |
} |
160 | 168 |
return null; |
161 | 169 |
} |
170 |
+ |
|
171 |
+ public static Posting from(Issue issue) { |
|
172 |
+ Posting posting = new Posting(); |
|
173 |
+ |
|
174 |
+ posting.title = issue.title; |
|
175 |
+ posting.body = issue.body; |
|
176 |
+ posting.history = issue.history; |
|
177 |
+ posting.createdDate = issue.createdDate; |
|
178 |
+ posting.updatedDate = issue.updatedDate; |
|
179 |
+ posting.authorId = issue.authorId; |
|
180 |
+ posting.authorLoginId = issue.authorLoginId; |
|
181 |
+ posting.authorName = issue.authorName; |
|
182 |
+ posting.project = issue.project; |
|
183 |
+ |
|
184 |
+ return posting; |
|
185 |
+ } |
|
162 | 186 |
} |
--- app/models/PostingComment.java
+++ app/models/PostingComment.java
... | ... | @@ -102,4 +102,10 @@ |
102 | 102 |
} |
103 | 103 |
}; |
104 | 104 |
} |
105 |
+ |
|
106 |
+ public static List<PostingComment> findAllBy(Posting posting) { |
|
107 |
+ return find.where() |
|
108 |
+ .eq("id", posting.id) |
|
109 |
+ .findList(); |
|
110 |
+ } |
|
105 | 111 |
} |
--- conf/routes
+++ conf/routes
... | ... | @@ -44,6 +44,9 @@ |
44 | 44 |
POST /-_-api/v1/owners/:owner/projects/:projectName/posts controllers.api.BoardApi.newPostings(owner:String, projectName:String) |
45 | 45 |
PATCH /-_-api/v1/owners/:owner/projects/:projectName/posts/:number/content controllers.api.BoardApi.updatePostingContent(owner: String, projectName: String, number: Long) |
46 | 46 |
POST /-_-api/v1/owners/:owner/projects/:projectName/posts/:number/comments controllers.api.BoardApi.newPostingComment(owner:String, projectName:String, number:Long) |
47 |
+ |
|
48 |
+POST /-_-api/v1/owners/:owner/projects/:projectName/issues/imports controllers.api.IssueApi.imports(owner:String, projectName:String) |
|
49 |
+ |
|
47 | 50 |
POST /-_-api/v1/owners/:owner/projects/:projectName/postlabel/:number controllers.api.BoardApi.updatePostLabel(owner:String, projectName:String, number:Long) |
48 | 51 |
POST /-_-api/v1/owners/:owner/projects/:projectName/issues controllers.api.IssueApi.newIssues(owner:String, projectName:String) |
49 | 52 |
POST /-_-api/v1/owners/:owner/projects/:projectName/issues/:number/comments controllers.api.IssueApi.newIssueComment(owner:String, projectName:String, number:Long) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?