Skip to content

Commit

Permalink
condition for only taskStatus 1
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwarz2030 committed Jan 15, 2025
1 parent 5e6cffa commit e9ce376
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import messages from './Messages'
import { constructChangesetUrl } from '../../../../utils/constructChangesetUrl'
import { replacePropertyTags } from '../../../../hooks/UsePropertyReplacement/UsePropertyReplacement'
import './ActiveTaskControls.scss'
import { TASK_STATUS_FIXED } from '../../../../services/Task/TaskStatus/TaskStatus';

const hiddenShortcutGroup = 'taskCompletion'
const hiddenShortcuts = ['skip', 'falsePositive', 'fixed', 'tooHard', 'alreadyFixed']
Expand Down Expand Up @@ -174,10 +175,10 @@ export class ActiveTaskControls extends Component {
const message = intl.formatMessage(messages.rapidDiscardUnsavedChanges)

if (!this.props.rapidEditorState.hasUnsavedChanges || window.confirm(message)) {
const requireComment = this.props.challenge.requireComment || this.props.challenge.parent.requireComment;
const disableTaskConfirm = !requireComment && this.props.user.settings.disableTaskConfirm
const requireConfirmation = this.props.challenge.requireConfirmation || this.props.challenge.parent.requireConfirmation;
const disableTaskConfirm = !requireConfirmation && this.props.user.settings.disableTaskConfirm

if (disableTaskConfirm) {
if (taskStatus === TASK_STATUS_FIXED && disableTaskConfirm) {
this.setState({
osmComment: `${this.props.task.parent.checkinComment}${constructChangesetUrl(this.props.task)}`,
confirmingStatus: taskStatus,
Expand Down
2 changes: 1 addition & 1 deletion src/services/Challenge/Challenge.js
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ export const fetchChallenges = function (
"limitTags",
"limitReviewTags",
"taskStyles",
"requireComment",
"requireConfirmation",

Check warning on line 1025 in src/services/Challenge/Challenge.js

View check run for this annotation

Codecov / codecov/patch

src/services/Challenge/Challenge.js#L1025

Added line #L1025 was not covered by tests
"requiresLocal",
"reviewSetting",
"taskWidgetLayout",
Expand Down

0 comments on commit e9ce376

Please sign in to comment.