Set modified_from to "code_corps" on tasks and comments when updating from codecorps #1163
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's in this PR?
This PR makes it so that every time a task or comment is modified from the client application, thus, from CodeCorps, not some other location, the
:modified_from
field on thatTask
orComment
respectively is set to"code_corps"
."code_corps"
was already our field default, so I wen't with that, instead of"codecorps"
as instructed in the issue.Since it was our field default, the field was set correctly upon initial creation from the client app. However, a subsequent modification from github, followed by modification from codecorps, would result in
:modified_from
being incorrectly stuck on"github"
, even though the last source of the modification was in fact the client app.Note that the
create_changeset
is also used in our seeds. It makes sense as it is, but if we want to seed our db with tasks or comments linked to github, we need to take that into account.References
Fixes #1145