From fe4ca181f74b7fc43a2d321eb3aac788339fdac7 Mon Sep 17 00:00:00 2001 From: Richard Frank Date: Tue, 1 Sep 2015 10:30:07 -0600 Subject: [PATCH] Fetches new title info when an issue is opened Also adds issue title changed activity events for reference --- ember-app/app/models/new/issue.js | 3 +++ ember-app/app/templates/issue/events/renamed.hbs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/ember-app/app/models/new/issue.js b/ember-app/app/models/new/issue.js index 05686f0e..c88f9e7f 100644 --- a/ember-app/app/models/new/issue.js +++ b/ember-app/app/models/new/issue.js @@ -38,6 +38,9 @@ var Issue = Model.extend({ this.set("processing", true); return Ember.$.getJSON(`${this.get("apiUrl")}/details`) .success(function(details){ + this.set("title", details.title); + this.set("body", details.body); + this.set("body_html", details.body_html); this.set("data.repo", details.repo); this.set("data.activities", details.activities); this.set("processing", false); diff --git a/ember-app/app/templates/issue/events/renamed.hbs b/ember-app/app/templates/issue/events/renamed.hbs index e69de29b..6c59ab3a 100644 --- a/ember-app/app/templates/issue/events/renamed.hbs +++ b/ember-app/app/templates/issue/events/renamed.hbs @@ -0,0 +1,2 @@ + {{hb-avatar user=model.actor width=20 height=20}} + {{model.actor.login}} changed the title from {{truncate model.rename.from 28}} to {{truncate model.rename.to 28}} {{ago model.created_at }}