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

Application timestamp logs assigning and unassigning workshops #26583

Merged
merged 3 commits into from Jan 16, 2019

Conversation

clareconstantine
Copy link

@clareconstantine clareconstantine commented Jan 11, 2019

Teacher app logs summer workshop changes, Facilitator app logs summer and FiT workshop changes

note: nothing is logged about workshops until one is assigned - this is just a partial screenshot which is why it shows 'Unassigned' first

screen shot 2019-01-11 at 3 47 08 pm

@@ -96,6 +96,10 @@ def fit_workshop_date_and_location
fit_workshop.try(&:date_and_location_name)
end

def log_fit_workshop_change(user)
update_status_timestamp_change_log(user, "Fit Workshop: #{fit_workshop_date_and_location || 'Unassigned'}")
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to add a verb here so readers know what happened, e.g. "Registered/Attended Fit Workshop..."?

Copy link
Author

Choose a reason for hiding this comment

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

The only thing we are logging is when someone changes the workshop this applicant is assigned to (which is the one they will eventually be sent registration info for), which happens here in the detail view. Registering and attending aren't currently being tracked here, and that data is captured in the workshop dashboard. But there wasn't a spec for this, so I will double check what language they want.


assert_equal [
{
title: "Fit Workshop: #{@csp_facilitator_application.fit_workshop_date_and_location}",
Copy link
Contributor

Choose a reason for hiding this comment

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

Could the fit_workshop_date_and_location be "Unassigned"? Same for workshop_date_and_location

Copy link
Author

Choose a reason for hiding this comment

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

ooh, actually, when I log this, I should be logging "Unassigned" based on whether or not the workshop is assigned (if application.fit_workshop_id exists), not based on the value of application.fit_workshop_data_and_location, because if the city name is missing in the workshop, for example, that will be nil but the workshop is assigned.

But to answer your question, currently those methods don't return "Unassigned", they either return the date and location string or nil.

@@ -329,6 +332,46 @@ class ApplicationsControllerTest < ::ActionController::TestCase
assert_equal [], @csd_teacher_application_with_partner.sanitize_status_timestamp_change_log
end

test 'update appends to the timestamp log if fit workshop is changed' do
sign_in @program_manager
@csp_facilitator_application.update(status_timestamp_change_log: '[]')
Copy link
Contributor

Choose a reason for hiding this comment

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

why we choose @csp_facilitator_application instead of @csd_facilitator_application, are they different?

Copy link
Author

Choose a reason for hiding this comment

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

I only created a CSP facilitator application. CSF, CSD, and CSP facilitator applications all get assigned to FiT Workshops, but only CSD and CSP applications are assigned to a 5-day summer workshop. The differences between CSD and CSP are that they have a different course and are shown slightly different questions (stored in the form_data

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.

None yet

2 participants