-
Notifications
You must be signed in to change notification settings - Fork 191
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
base: develop
Are you sure you want to change the base?
Conversation
@@ -1,5 +1,6 @@ | |||
[v#.#.#] ([month] [YYYY]) | |||
- Hera: Add new layout with redesigned navigation | |||
- Revisions: Show changed state in the revisions view |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 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 |
There was a problem hiding this comment.
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? |
There was a problem hiding this comment.
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?
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