Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github issue number to task view #1026

Merged
merged 1 commit into from
Oct 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/code_corps/model/task.ex
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ defmodule CodeCorps.Task do
field :closed_at, :utc_datetime
field :created_at, :utc_datetime
field :created_from, :string, default: "code_corps"
field :github_issue_number, :integer
field :markdown, :string
field :modified_at, :utc_datetime
field :modified_from, :string, default: "code_corps"
field :number, :integer, read_after_writes: true
field :order, :integer
field :status, :string, default: "open"
field :title, :string
field :github_issue_number, :integer

field :position, :integer, virtual: true

Expand Down
5 changes: 3 additions & 2 deletions lib/code_corps_web/views/task_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ defmodule CodeCorpsWeb.TaskView do
use JaSerializer.PhoenixView

attributes [
:archived, :body, :created_at, :created_from, :inserted_at, :markdown,
:modified_at, :modified_from, :number, :order, :status, :title, :updated_at
:archived, :body, :created_at, :created_from, :github_issue_number,
:inserted_at, :markdown, :modified_at, :modified_from, :number, :order,
:status, :title, :updated_at
]

has_one :github_repo, serializer: CodeCorpsWeb.GithubRepoView
Expand Down
1 change: 1 addition & 0 deletions test/lib/code_corps_web/views/task_view_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ defmodule CodeCorpsWeb.TaskViewTest do
"body" => task.body,
"created-at" => task.created_at,
"created-from" => task.created_from,
"github-issue-number" => task.github_issue_number,
"inserted-at" => task.inserted_at,
"markdown" => task.markdown,
"modified-at" => task.modified_at,
Expand Down