Skip to content

Add additional test fields - #6149

Merged
SchrodingersGat merged 9 commits into
inventree:masterfrom
martonmiklos:add_additional_test_fields
Mar 17, 2024
Merged

SchrodingersGat merged 9 commits into
inventree:masterfrom
martonmiklos:add_additional_test_fields

Conversation

@martonmiklos

@martonmiklos martonmiklos commented Jan 2, 2024 •

Copy link
Copy Markdown
Contributor

As we discussed in the #5995 I would like to add the following extra fields to the test results:

  • test station name
  • test start/finish time (to handle use cases where the test execution is asynchronous from the logging)
  • retest (for improving the performance of the statistics creation)

I have an another branch where I built some statistics UI on the top of this:
kép

Once we iron out this I will PR those changes as well.

@netlify

netlify Bot commented Jan 2, 2024 •

Copy link
Copy Markdown

✅ Deploy Preview for inventree-web-pui-preview canceled.

Name Link
🔨 Latest commit 5aceb03
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/65f76447d0631f00088b6403

@SchrodingersGat

Copy link
Copy Markdown
Member

In general I am happy with these additions, except for the "retest" field. I think that this could be easily calculated dynamically by counting the number of test results (for a single stock item) which have the same test key...

@martonmiklos

martonmiklos commented Jan 11, 2024 •

Copy link
Copy Markdown
Contributor Author

In general I am happy with these additions, except for the "retest" field. I think that this could be easily calculated dynamically by counting the number of test results (for a single stock item) which have the same test key...

My intention with the retest "caching" is the fact that we are mainly interested in the retesting percentage per part/test type/build order. In these queries we could have a plenty of test results: sometimes we manufacture 1K Build orders, atm. I have 270K serial numbers imported in InvenTree.

@martonmiklos

Copy link
Copy Markdown
Contributor Author

In general I am happy with these additions,

One more question came into my mind the (old) UI:
The new test station, test started/finished date columns are hidden by default:

kép

I would rather sort the results by the Test finished date (which is identical if no other date passed) and would rename the "Test date" to "Result save date" or something similar. This would always allow the test execution process to be overviewed in the "natural flow" regardless if the test results were uploaded asynchronously or mixed orders.

The test "Start date" and the "Result save date" columns could be hidden by default to spare "screen estate".

@github-actions

Copy link
Copy Markdown
Contributor

This PR seems stale. Please react to show this is still important.

@github-actions github-actions Bot added the inactive Indicates lack of activity label Mar 12, 2024
@martonmiklos

Copy link
Copy Markdown
Contributor Author

In general I am happy with these additions, except for the "retest" field. I think that this could be easily calculated dynamically by counting the number of test results (for a single stock item) which have the same test key...

@SchrodingersGat
May I ask you reflect my comments above? I would like to push this through even without the retest field if you really against that.

@SchrodingersGat

Copy link
Copy Markdown
Member

@martonmiklos I would like to see this move forward too. After another chance to look at it:

Timestamping

We already have the date field (which records the datetime timestamp when the test was recorded). Is this sufficient for recording the "test end time"? Otherwise we are potentially duplicating this data. Would like to hear your thoughts on this.

Retest Field

Would you be opposed to a dynamic calculation which calculates percentage of failed tests on the fly? I'm still not 100% sure on your proposed usage for this field

@martonmiklos

Copy link
Copy Markdown
Contributor Author

@martonmiklos I would like to see this move forward too. After another chance to look at it:

Timestamping

We already have the date field (which records the datetime timestamp when the test was recorded). Is this sufficient for recording the "test end time"? Otherwise we are potentially duplicating this data. Would like to hear your thoughts on this.

The date field currently holds the date when the test was uploaded to InvenTree, which is not necessary the same as the execution start date. (In the case if the test result uploading is done asynchronously.) Storing the end date might also help making statistics (i.e. some operators performing testing way slower than others etc.)

Retest Field

Would you be opposed to a dynamic calculation which calculates percentage of failed tests on the fly? I'm still not 100% sure on your proposed usage for this field

You are right, I will remove the field and do the calculations on the fly.

@SchrodingersGat

Copy link
Copy Markdown
Member

@martonmiklos ok, happy if you keep the new date fields, and remove the "retest" field. Please address conflicts in the current PR.

Can you also update the new testresulttable in the react interface?

https://github.com/inventree/InvenTree/blob/master/src/frontend/src/tables/stock/StockItemTestResultTable.tsx

@github-actions github-actions Bot removed the inactive Indicates lack of activity label Mar 13, 2024
@martonmiklos
martonmiklos force-pushed the add_additional_test_fields branch from c5b4a8a to faf5b00 Compare March 17, 2024 20:37
@martonmiklos
martonmiklos force-pushed the add_additional_test_fields branch from faf5b00 to eb12383 Compare March 17, 2024 20:59
@SchrodingersGat

Copy link
Copy Markdown
Member

@martonmiklos thanks for the contribution! Please submit a separate PR to add these new fields to the test result table in the react interface!

@SchrodingersGat
SchrodingersGat merged commit 0c661f4 into inventree:master Mar 17, 2024
@SchrodingersGat SchrodingersGat added enhancement This is an suggested enhancement or new feature stock Related to Stock models api Relates to the API labels Mar 17, 2024
@SchrodingersGat SchrodingersGat added this to the 0.15.0 milestone Mar 17, 2024
@martonmiklos

Copy link
Copy Markdown
Contributor Author

@martonmiklos thanks for the contribution! Please submit a separate PR to add these new fields to the test result table in the react interface!

Thank you for your patience and the merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Relates to the API enhancement This is an suggested enhancement or new feature stock Related to Stock models

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants