diff --git a/app/org/maproulette/framework/controller/TaskReviewController.scala b/app/org/maproulette/framework/controller/TaskReviewController.scala index d1e7a96f..d1fdfd73 100644 --- a/app/org/maproulette/framework/controller/TaskReviewController.scala +++ b/app/org/maproulette/framework/controller/TaskReviewController.scala @@ -341,10 +341,13 @@ class TaskReviewController @Inject() ( val csvRows = metrics.map { row => displayedColumns.split(",").flatMap { case "Internal Id" => Seq(row.review.taskId) + case "Feature Id" => Seq(row.task.name) case "Review Status" => Seq(Task.reviewStatusMap(row.review.reviewStatus.get)) case "Mapper" => Seq(row.review.reviewRequestedByUsername.getOrElse("")) case "Challenge" => Seq(row.review.challengeName.getOrElse("")) + case "Challenge Id" => Seq(row.task.parent) case "Project" => Seq(row.review.projectName.getOrElse("")) + case "Project Id" => Seq(row.review.projectId.getOrElse("")) case "Mapped On" => Seq(row.task.mappedOn.getOrElse("")) case "Reviewer" => Seq(row.review.reviewedByUsername.getOrElse("")) case "Reviewed On" => Seq(row.review.reviewedAt.getOrElse("")) diff --git a/app/org/maproulette/framework/mixins/TaskParserMixin.scala b/app/org/maproulette/framework/mixins/TaskParserMixin.scala index ee5de80a..55bf3fdf 100644 --- a/app/org/maproulette/framework/mixins/TaskParserMixin.scala +++ b/app/org/maproulette/framework/mixins/TaskParserMixin.scala @@ -149,6 +149,7 @@ trait TaskParserMixin { // challenges and projects fields get[Option[String]]("challenge_name") ~ get[Option[String]]("project_name") ~ + get[Option[Int]]("project_id") ~ // users fields get[Option[String]]("review_requested_by_username") ~ get[Option[String]]("reviewed_by_username") map { @@ -158,7 +159,7 @@ trait TaskParserMixin { reviewStatus ~ reviewRequestedBy ~ reviewedBy ~ reviewedAt ~ metaReviewedBy ~ metaReviewStatus ~ metaReviewedAt ~ reviewStartedAt ~ reviewClaimedBy ~ reviewClaimedAt ~ additionalReviewers ~ errorTags ~ - challengeName ~ projectName ~ + challengeName ~ projectName ~ projectId ~ reviewRequestedByUsername ~ reviewedByUsername => val values = updateAndRetrieve(id, geojson, location, cooperativeWork) TaskWithReview( @@ -202,6 +203,7 @@ trait TaskParserMixin { reviewStatus, challengeName, projectName, + projectId, reviewRequestedBy, reviewRequestedByUsername, reviewedBy, diff --git a/app/org/maproulette/framework/model/TaskReview.scala b/app/org/maproulette/framework/model/TaskReview.scala index 8d4e7f8d..b1ee0d02 100644 --- a/app/org/maproulette/framework/model/TaskReview.scala +++ b/app/org/maproulette/framework/model/TaskReview.scala @@ -17,6 +17,7 @@ case class TaskReview( reviewStatus: Option[Int], challengeName: Option[String], projectName: Option[String], + projectId: Option[Int], reviewRequestedBy: Option[Long], reviewRequestedByUsername: Option[String], reviewedBy: Option[Long], diff --git a/app/org/maproulette/framework/repository/TaskHistoryRepository.scala b/app/org/maproulette/framework/repository/TaskHistoryRepository.scala index 0a133236..d5598dd0 100644 --- a/app/org/maproulette/framework/repository/TaskHistoryRepository.scala +++ b/app/org/maproulette/framework/repository/TaskHistoryRepository.scala @@ -64,6 +64,7 @@ class TaskHistoryRepository @Inject() (override val db: Database) extends Reposi None, None, None, + None, requestedBy, None, reviewedBy, diff --git a/app/org/maproulette/framework/repository/TaskReviewRepository.scala b/app/org/maproulette/framework/repository/TaskReviewRepository.scala index 8de3d9f9..fd22d462 100644 --- a/app/org/maproulette/framework/repository/TaskReviewRepository.scala +++ b/app/org/maproulette/framework/repository/TaskReviewRepository.scala @@ -50,6 +50,7 @@ class TaskReviewRepository @Inject() ( SELECT $retrieveColumnsWithReview, challenges.name as challenge_name, projects.name as project_name, + projects.id as project_id, mappers.name as review_requested_by_username, reviewers.name as reviewed_by_username FROM tasks @@ -516,6 +517,7 @@ class TaskReviewRepository @Inject() ( -- challenges and projects fields c.name AS challenge_name, + p.id AS project_id, p.display_name AS project_name, -- users fields