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

Audit over API does not set next audit date in database #6004

Closed
jazz-o-mat opened this issue Jul 30, 2018 · 1 comment
Closed

Audit over API does not set next audit date in database #6004

jazz-o-mat opened this issue Jul 30, 2018 · 1 comment
Milestone

Comments

@jazz-o-mat
Copy link

jazz-o-mat commented Jul 30, 2018

Please confirm you have done the following before posting your bug report:

Describe the bug
When i do an Audit over GUI, next audit date will shown in the asset table view.
When i audit over API, it is not shown.

The output:
{"status":"success","messages":"Asset audit successfully logged.","payload":{"asset_tag":"00000016","note":"","next_audit_date":{"datetime":"2019-07-30 00:00:00","formatted":"30.07.2019 00:00"}

But the table field in GUI stays empty.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Assets/Bulk audit"
  2. Click on 'Audit for an asset'
  3. Go to 'Assets/List"
  4. Search for "this asset"
  5. Look at "Next Audit Date" - filled
  6. Run curl with:
    curl https://assets.qa.server.com/api/v1/hardware/audit -H "Authorization: Bearer eyJ0eXAi...iUYG3wIfcY" -H "Content-Type: application/json" --request POST --data '{"asset_tag":"00000016","location_id":"1"}'
    {"status":"success","messages":"Asset audit successfully logged.","payload":{"asset_tag":"00000016","note":"","next_audit_date":{"datetime":"2019-07-30 00:00:00","formatted":"30.07.2019 00:00"}}}
    7: Look at "Next Audit Date" - empty

Expected behavior
"Next Audit Date" should be filled

Server (please complete the following information):

  • Snipe-IT Version v4.6.3 - build 3866 (master)
  • OS: [CentOS]
  • Web Server: [Apache]
  • PHP Version 7.0.31
@snipe
Copy link
Owner

snipe commented Aug 1, 2018

The two behave exactly the same, the difference is that the front-end pre-populates the next audit date. If you pass a next_audit_date via the API, that will be stored.

@snipe snipe added this to the v5.0 milestone Aug 1, 2018
@snipe snipe closed this as completed Aug 1, 2018
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

No branches or pull requests

2 participants