Skip to content
This repository has been archived by the owner on Nov 20, 2019. It is now read-only.

Commit

Permalink
Changed filter and headOption to find
Browse files Browse the repository at this point in the history
  • Loading branch information
EECOLOR committed Dec 15, 2015
1 parent a32bf7a commit e36c48b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/scala/fly/play/jiraExceptionProcessor/Jira.scala
Expand Up @@ -85,10 +85,9 @@ class Jira(
private def extractHashCustomFieldIdFrom(json: JsValue) = {
val hashCustomField =
json.as[Seq[JsValue]]
.filter { field =>
.find { field =>
(field \ "name").as[String] == configuration.hashCustomFieldName
}
.headOption
.getOrElse(throw new Exception("Could not find a field with the name 'Hash'"))

(hashCustomField \ "id").as[String]
Expand Down

0 comments on commit e36c48b

Please sign in to comment.