Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show state change in the revisions view #1310

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open

Conversation

aapomm
Copy link
Contributor

@aapomm aapomm commented Oct 25, 2024

Spec

When a record's QA state is updated, a revision (version history entry) is created. However, no changes are displayed since our revision view only shows content changes.

Proposed solution
Display the changed state (if changed) in the revisions view.

Check List

  • Added a CHANGELOG entry

@@ -1,5 +1,6 @@
[v#.#.#] ([month] [YYYY])
- Hera: Add new layout with redesigned navigation
- Revisions: Show changed state in the revisions view
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Revisions: Show changed state in the revisions view
- Revisions: Show state changes in the revisions view

def changed_state
return {} unless @record.respond_to?(:state)

# Cast the ['state'] attribute as it can be both the state index (0,1,2) or
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In what case would we get the index instead of the string value?

@@ -83,7 +83,13 @@ def update
if @issue.update(issue_params)
@modified = true
check_for_edit_conflicts(@issue, updated_at_before_save)
track_updated(@issue)

if @issue.state_previously_changed? && !@issue.text_previously_changed?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about moving this block into a helper to reduce clutter in the action?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants