Skip to content
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
12 changes: 9 additions & 3 deletions app/org/maproulette/framework/model/Task.scala
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,15 @@
if (allowChange)
toSet == STATUS_FIXED || toSet == STATUS_FALSE_POSITIVE || toSet == STATUS_TOO_HARD
else false
case STATUS_ANSWERED => false
case STATUS_VALIDATED => false
case STATUS_DISABLED => toSet == STATUS_CREATED
case STATUS_ANSWERED =>
if (allowChange)
toSet == STATUS_FIXED || toSet == STATUS_FALSE_POSITIVE || toSet == STATUS_ALREADY_FIXED || toSet == STATUS_TOO_HARD
else false

Check warning on line 330 in app/org/maproulette/framework/model/Task.scala

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove the unnecessary Boolean literal.

See more on https://sonarcloud.io/project/issues?id=maproulette_maproulette2&issues=AZ0BgtRvPm9DgMgZ6Qyu&open=AZ0BgtRvPm9DgMgZ6Qyu&pullRequest=1207
case STATUS_VALIDATED =>
if (allowChange)
toSet == STATUS_FIXED || toSet == STATUS_FALSE_POSITIVE || toSet == STATUS_ALREADY_FIXED || toSet == STATUS_TOO_HARD
else false

Check warning on line 334 in app/org/maproulette/framework/model/Task.scala

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove the unnecessary Boolean literal.

See more on https://sonarcloud.io/project/issues?id=maproulette_maproulette2&issues=AZ0BgtRvPm9DgMgZ6Qyv&open=AZ0BgtRvPm9DgMgZ6Qyv&pullRequest=1207

Check warning on line 334 in app/org/maproulette/framework/model/Task.scala

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

This branch's code block is the same as the block for the branch on line 328.

See more on https://sonarcloud.io/project/issues?id=maproulette_maproulette2&issues=AZ0BgtRvPm9DgMgZ6Qyt&open=AZ0BgtRvPm9DgMgZ6Qyt&pullRequest=1207
case STATUS_DISABLED => toSet == STATUS_CREATED
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ class TaskReviewService @Inject() (
excludeOtherReviewers
)

addClaimedByFilter(query, user.id)
addLockedFilter(addClaimedByFilter(query, user.id))
}

private def addClaimedByFilter(query: Query, userId: Long): Query = {
Expand Down
Loading