Skip to content

ft-close-incident-reports: update incident report transitional state #322

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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

gitau-kinuthia
Copy link
Contributor

@gitau-kinuthia gitau-kinuthia commented Aug 8, 2019

What does this PR do?

Add functionality for closing an incident report if an asset status moves from damaged/lost to
allocated/available

Description of Task to be completed?

Update an assets's transition state to CLOSED when an Asset status is changed from (DAMAGED, LOST) to either (AVAILABLE, ALLOCATED)

How should this be manually tested?

  1. On browser, goto url {base_url}/api/v1/incidence-reports/

Any background context you want to provide?

What are the relevant pivotal tracker stories?

164101493

Postman Documentation

Screenshots (If applicable)

@gitau-kinuthia gitau-kinuthia requested a review from kmazi August 8, 2019 16:28
@gitau-kinuthia gitau-kinuthia force-pushed the ft-closed-incident-report-164101493 branch 3 times, most recently from efb7753 to 2df730e Compare August 15, 2019 16:08
@coveralls
Copy link

coveralls commented Aug 20, 2019

Coverage Status

Coverage increased (+0.07%) to 91.321% when pulling 3c8b6f6 on ft-closed-incident-report-164101493 into ea4c5cb on develop.

).objects.get_or_create(asset_incident_report_id=self.incident_report.id)
self.transition_state = self.transition_state[0]

def test_update_asset_status_from_lost_to_available(self):
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is outside the context of the story. (fyi)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please elaborate on this

@gitau-kinuthia gitau-kinuthia force-pushed the ft-closed-incident-report-164101493 branch from bdb4334 to c1cb5d9 Compare August 28, 2019 12:49
- Add model signals to listen for changes
- Add unit tests for the signals

[Delivers ##167427843]
- update model signals
- Add unit tests for the updated signals

[Delivers #164101493]
- Update model signals
- Add unit tests for the updated signals
- Fix failing  linting checks
- fix failing unit tests

[Delivers #164101493]
@gitau-kinuthia gitau-kinuthia force-pushed the ft-closed-incident-report-164101493 branch from c1cb5d9 to 978a7d2 Compare August 28, 2019 13:02
@gitau-kinuthia gitau-kinuthia requested a review from kmazi August 28, 2019 13:30
@gitau-kinuthia gitau-kinuthia force-pushed the ft-closed-incident-report-164101493 branch from 978a7d2 to 50fc63d Compare August 28, 2019 13:47
-  Add notifications model
- add signals to create notifications
- add unit tests
- configure django_q and django_cache
- resolve merge conflicts
- update README.md
- apply PR feedback
- remove curly braces from notification body template
- update functionality to close transition report on asset status
  change to `lost` or `damaged`

[Delivers #161678177]
@gitau-kinuthia gitau-kinuthia force-pushed the ft-closed-incident-report-164101493 branch from 50fc63d to e4fec7c Compare August 28, 2019 13:49
Copy link
Collaborator

@kmazi kmazi left a comment

Choose a reason for hiding this comment

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

Could you also add test to show that this could be accomplished via endpoint. You know, it serves as a documentation on how to use the api level interface.

@gitau-kinuthia gitau-kinuthia force-pushed the ft-closed-incident-report-164101493 branch 2 times, most recently from 7ef99e7 to 0c2331b Compare September 4, 2019 10:21
-  Add notifications model
- add signals to create notifications
- add model level unit tests
- configure django_q and django_cache
- resolve merge conflicts
- update README.md
- apply PR feedback
- remove curly braces from notification body template
- update functionality to close transition report on asset status
  change to `lost` or `damaged`
- add api level api tests

[Delivers #161678177]
@gitau-kinuthia gitau-kinuthia force-pushed the ft-closed-incident-report-164101493 branch from 0c2331b to 3c8b6f6 Compare September 4, 2019 10:24
@gitau-kinuthia gitau-kinuthia requested a review from kmazi September 4, 2019 10:28
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.

3 participants