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

Feature/further request event fixes #1036

Merged
merged 5 commits into from
Aug 15, 2013

Conversation

crowbot
Copy link
Member

@crowbot crowbot commented Aug 8, 2013

The previous fix for #460, b24ad7c, does fix the problem of request events ending up with an incorrect latest_status value when a status update is made, and so turning up in the wrong results sets for status-based searches. But it has the disadvantage that setting the calculated state on the new 'status_update' event stopped the state propagating backwards to any preceding response. So searches that combined a 'variety:response' and status filter would have been missing requests. This pull request includes a fix that still allows the state to propagate backwards to any recent response, adds a similar fix for admin edits, and includes a script to fix up the event history of any requests that are currently returning an incorrect value for 'latest_status'.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 8a79a99 on feature/further-request-event-fixes into f6de092 on rails-3-develop.

@mhl
Copy link
Contributor

mhl commented Aug 14, 2013

Overall looks good, as far as my understanding of the (very involved!) issues here go. My comments are all quite minor - it'd be good to deal with them, but I'm happy for this to be merged.

Update test expectations and add further test to explicitly show that we
want the described status from a status update to be propagated to a
preceding response, as well as being filled in in the status update
itself (which is mostly to deal with the case where there isn't a
preceding response). Make those changes to calculate_event_states
Make sure that admin edits changing the described state of an info
request are reflected in the latest_status and status values of info
request events so that the info requests are retrieved correctly in
status-based searches.
Set to 'waiting_response' on creation, to match the displayed state.
Add some notes on the logic and expectations around
InfoRequest.described_state and calculate_status and
InfoRequestEvent.described_state and calculated_state.
@crowbot crowbot merged commit 8714cf4 into rails-3-develop Aug 15, 2013
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 8714cf4 on feature/further-request-event-fixes into 212dcc4 on rails-3-develop.

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

3 participants