Skip to content

Commit

Permalink
[607] Most labels aren't showing up
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusf committed May 22, 2015
2 parents 4db997b + 560134a commit 83dd35f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/main/java/backend/resource/Model.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ public Optional<TurboIssue> getIssueById(int issueId) {
return Optional.empty();
}

public Optional<TurboLabel> getLabelByName(String labelName) {
public Optional<TurboLabel> getLabelByActualName(String labelName) {
assert labelName != null && !labelName.isEmpty() : "Invalid label name " + labelName;
for (TurboLabel label : getLabels()) {
if (label.getName().equals(labelName)) {
if (label.getActualName().equals(labelName)) {
return Optional.of(label);
}
}
Expand Down Expand Up @@ -183,7 +183,7 @@ public Optional<TurboUser> getAssigneeOfIssue(TurboIssue issue) {

public List<TurboLabel> getLabelsOfIssue(TurboIssue issue) {
return issue.getLabels().stream()
.map(this::getLabelByName)
.map(this::getLabelByActualName)
.filter(Optional::isPresent).map(Optional::get)
.collect(Collectors.toList());
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ui/issuepanel/IssuePanelCell.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private void registerDragEvents(TurboIssue issue) {
success = true;
DragData dd = DragData.deserialise(db.getString());
if (dd.getSource() == DragData.Source.LABEL_TAB) {
// Optional<TurboLabel> label = model.getLabelByName(dd.getEntityName());
// Optional<TurboLabel> label = model.getLabelByActualName(dd.getEntityName());
// assert label.isPresent();
// (new TurboIssueAddLabels(model, issue, Arrays.asList(label.get()))).execute();
} else if (dd.getSource() == DragData.Source.ASSIGNEE_TAB) {
Expand Down

0 comments on commit 83dd35f

Please sign in to comment.