Skip to content

Recently updated state does not persist past the latest resolved or fixed issue? #887

Open
@ssciolla

Description

@ssciolla

When fixing and resolving issues in the UFixitModal when filtered to "Active Issues" (the default), if the user fixes or resolves multiple issues, only the latest updated issue stays in the modal. See the video below for an example:

Screen.Recording.2023-02-12.at.7.59.51.PM.mov

I believe this is because the report from the backend supersedes the frontend report in this handler method, and the extra logic that follows to keep the last resolved issue in the modal only affects the latest issue.

handleIssueSave(newIssue, newReport) {
let { report } = this.state
report = {...report, ...newReport}
if (report && Array.isArray(report.issues)) {
report.issues = report.issues.map(issue => (issue.id == newIssue.id) ? newIssue : issue)
}
this.setState({ report })
}

For people familiar with the design decisions with version 3, is this deliberate? There are small changes we could make here to keep all fixed or resolved issues in the modal until it has been closed. I think the current behavior is somewhat confusing and it would make sense to keep anything changed while the modal has been open in view, so users can review (or un-do) their work.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions