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

Not logging source state #37

Closed
jonasvp opened this issue Jul 12, 2016 · 6 comments
Closed

Not logging source state #37

jonasvp opened this issue Jul 12, 2016 · 6 comments

Comments

@jonasvp
Copy link
Contributor

jonasvp commented Jul 12, 2016

I'm not sure why the target state of the transition is logged but not the source state. The target can be inferred from the transition, since every transition can only have one target. The source is ambiguous, however, since it can be a list of states (https://github.com/kmmbvnr/django-fsm#usage).

I'll be happy to provide a pull request for saving the source to the StateLog model as well - or is there a reason it's currently not being logged?

@ticosax
Copy link
Member

ticosax commented Nov 9, 2017

I agree with your analysis, let's fix this.
I'll help you having a PR merged.

@blueyed
Copy link
Contributor

blueyed commented Jun 15, 2018

@jonasvp
Do you still want to provide a PR for this?

@blueyed
Copy link
Contributor

blueyed commented Jun 15, 2018

Somehow related: #74 (logging the state field's name)

jonasvp added a commit to jonasvp/django-fsm-log that referenced this issue Jun 19, 2018
This also renames `state` to `target_state` to make it more explicit.
Using `state` still works except when filtering using the ORM.
@jonasvp
Copy link
Contributor Author

jonasvp commented Jun 19, 2018

Sorry, I missed the comment by @ticosax ! Pull request is here: #75

jonasvp added a commit to jonasvp/django-fsm-log that referenced this issue Aug 21, 2018
This also renames `state` to `target_state` to make it more explicit.
Using `state` still works except when filtering using the ORM.
jonasvp added a commit to jonasvp/django-fsm-log that referenced this issue Aug 21, 2018
This also renames `state` to `target_state` to make it more explicit.
Using `state` still works except when filtering using the ORM.
jonasvp added a commit to jonasvp/django-fsm-log that referenced this issue Aug 21, 2018
This also renames `state` to `target_state` to make it more explicit.
Using `state` still works except when filtering using the ORM.
jonasvp added a commit to jonasvp/django-fsm-log that referenced this issue Sep 4, 2018
This also renames `state` to `target_state` to make it more explicit.
Using `state` still works except when filtering using the ORM.
jonasvp added a commit to jonasvp/django-fsm-log that referenced this issue Sep 4, 2018
This also renames `state` to `target_state` to make it more explicit.
Using `state` still works except when filtering using the ORM.
@jonasvp
Copy link
Contributor Author

jonasvp commented Sep 4, 2018

Sorry, took me a while to figure out how to run the tests locally.

@ticosax The PR is now ready for review, the tests are passing and coverage is up (the coverage report in the PR does not seem to update)

jonasvp added a commit to jonasvp/django-fsm-log that referenced this issue Sep 4, 2018
jonasvp added a commit to jonasvp/django-fsm-log that referenced this issue Sep 6, 2018
jonasvp added a commit to jonasvp/django-fsm-log that referenced this issue Sep 8, 2018
jonasvp added a commit to jonasvp/django-fsm-log that referenced this issue Sep 8, 2018
jonasvp added a commit to jonasvp/django-fsm-log that referenced this issue Sep 8, 2018
blueyed added a commit that referenced this issue Sep 21, 2018
feat: log source state on transitions #37
@blueyed
Copy link
Contributor

blueyed commented Sep 21, 2018

Merged in 0480d7e, thanks!

@blueyed blueyed closed this as completed Sep 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants