Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

adds monitoring to complaint detail timeline #218

Merged
merged 5 commits into from
Nov 2, 2021
Merged

Conversation

jduss4
Copy link
Collaborator

@jduss4 jduss4 commented Nov 1, 2021

Description of change

Displays linked monitoring reviews in an individual complaint's timeline alongside TTA activity and complaint updates. I didn't see a design specifically for this so I just picked some fields that seemed like they would be nice to display. If we would prefer to take something like "status" and change it into verbage the way that the complaint updates look (in progress / etc) we could do that.

Acceptance Criteria

  • add event type for monitoring review
  • incorporate into complaint detail view timeline
  • displays the correct information for the monitoring activity (currently chose status and type....not sure if that's right!)

How to test

Fire up the complaint tracker, head to a complaint's page, add a RAN ID, and it should appear in the timeline.

image

Issue(s)

Checklist

To be completed by the submitter:

  • Meets issue criteria
  • Code is meaningfully tested
  • Meets accessibility standards (WCAG 2.1 Levels A, AA)
  • API Documentation updated
  • Boundary diagram updated
  • Logical Data Model updated
  • Architectural Decision Records written for major infrastructure decisions

To the Reviewer

This project is using Conventional Comments to give structure
and context to PR comments. Please use these labels in your comments.

  • praise:
  • nitpick:
  • suggestion:
  • issue:
  • question:
  • thought:
  • chore:

@jduss4
Copy link
Collaborator Author

jduss4 commented Nov 1, 2021

This PR is in draft because @lauranash18f is going to look it over for design, but the bulk of the code seems unlikely to change (at least, I'm hoping) if people are looking for something to review

@jduss4 jduss4 force-pushed the monitoring_timeline branch from 911927b to 224fe15 Compare November 1, 2021 18:36
app/models/timeline.rb Outdated Show resolved Hide resolved
app/models/timeline.rb Show resolved Hide resolved
app/models/timeline/monitoring_event.rb Outdated Show resolved Hide resolved
spec/models/timeline/monitoring_review_spec.rb Outdated Show resolved Hide resolved
spec/models/monitoring_review_spec.rb Outdated Show resolved Hide resolved
spec/models/monitoring_review_spec.rb Outdated Show resolved Hide resolved
spec/models/monitoring_review_spec.rb Show resolved Hide resolved
@jduss4
Copy link
Collaborator Author

jduss4 commented Nov 1, 2021

@lauranash18f requests that outcome be displayed whenever the status is complete, so this is what we end up with

image

CONCERN 😟

@jduss4 jduss4 marked this pull request as ready for review November 2, 2021 00:46
@jduss4 jduss4 requested a review from Sgtpluck November 2, 2021 00:46
Copy link
Collaborator

@rahearn rahearn left a comment

Choose a reason for hiding this comment

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

I think the error raise is probably being punted to the error task, but I think an inline-comment would help make sure that implementation detail of raising the error that matches what the timeline event is expecting isn't forgotten

<div>
<ul class="usa-list usa-list--unstyled">
<li><strong>Status:</strong> <%= event.status %></li>
<% if event.status == "Complete" %>
Copy link
Collaborator

Choose a reason for hiding this comment

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

[suggestion (non-blocking)] instead of sprinkling checks like this around I think it would be better to have an event.complete? method (that likely delegates to the review object)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I like that idea!

def review_link
# using content_tag for the link will properly escape any dangerous characters that sneak into name or monitoring url
content_tag(:a, name, class: "usa-link", href: review.itams_url, target: "_blank")
rescue Api::Error
Copy link
Collaborator

Choose a reason for hiding this comment

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

[question] where does this get raised?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, I had copied that over from the TTA activity report without thinking about how I pulled out the get_api_data_field error for monitoring. If you think just commenting it for now is the way to go, I can do that and I'll add a note on the error issue.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, I think it's fine as long as the person implementing the error task is super aware of this being here

Copy link
Collaborator

@rahearn rahearn left a comment

Choose a reason for hiding this comment

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

🎉

@jduss4 jduss4 dismissed Sgtpluck’s stale review November 2, 2021 14:51

changes have been addressed

@jduss4 jduss4 merged commit 16980cd into main Nov 2, 2021
@jduss4 jduss4 deleted the monitoring_timeline branch November 2, 2021 14:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Task from 201: Display monitoring review in complaint timeline
3 participants