Skip to content

[O2B-1626] On creation of log, allow linking to it of data passes - #2246

Merged
graduta merged 20 commits into
mainfrom
feature/O2B-1626/log-creation-to-link-to-data-passes
Oct 16, 2026
Merged

graduta merged 20 commits into
mainfrom
feature/O2B-1626/log-creation-to-link-to-data-passes

Conversation

@graduta

@graduta graduta commented Oct 16, 2026

Copy link
Copy Markdown
Member

I have a JIRA ticket

  • branch and/or PR name(s) include(s) JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected

Notable changes for users:

  • This features allows users when they create a log/reply to a log to also link data passes to it for future reference

Notable changes for developers:

  • Endpoint for creation of log, controller, services have been updated to allow for linkinage of data passes to logs

Changes made to the database:

  • new link table has been created between logs and datapasses

@graduta
graduta requested a balanced review from Copilot October 16, 2026 09:18
@graduta graduta self-assigned this Oct 16, 2026
@graduta
graduta requested a review from isaachilly as a code owner October 16, 2026 09:18
@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.64103% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.36%. Comparing base (b8c5ebf) to head (62108a8).

Files with missing lines Patch % Lines
lib/public/views/Logs/Create/LogCreationModel.js 0.00% 12 Missing ⚠️
lib/public/views/Logs/Create/LogReplyModel.js 0.00% 3 Missing ⚠️
...b/public/views/Logs/Create/logCreationComponent.js 0.00% 3 Missing ⚠️
...ations/v1/20261010100000-create-log-data-passes.js 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2246      +/-   ##
==========================================
+ Coverage   46.24%   46.36%   +0.12%     
==========================================
  Files        1042     1046       +4     
  Lines       17190    17258      +68     
  Branches     3127     3140      +13     
==========================================
+ Hits         7949     8002      +53     
- Misses       9241     9256      +15     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Public log retrieval still omits saved data-pass links, preventing reply inheritance and undermining the new browser assertions.

2 open findings
What changed in this PR

Adds data-pass links to log creation and replies, spanning the form, creation services, and database storage.

Changes:

  • Accept and validate data-pass names when creating logs.
  • Store associations and expose compact data-pass references.
  • Add form inputs, reply inheritance, fixtures, and tests.
File Description
test/​public/​logs/​create.test.js Tests linked passes and autofill.
test/​lib/​usecases/​log/​CreateLogUseCase.test.js Tests duplicates and unknown names.
lib/​usecases/​log/​CreateLogUseCase.js Deduplicates and forwards names.
lib/​server/​services/​run/​RunService.js Adjusts creation arguments.
lib/​server/​services/​run/​logEntriesCreation/​logSpecificRunTag.js Preserves transaction argument position.
lib/​server/​services/​run/​logEntriesCreation/​logRunQualityChange.js Preserves transaction argument position.
lib/​server/​services/​run/​logEntriesCreation/​logCalibrationStatusChange.js Preserves transaction argument position.
lib/​server/​services/​log/​LogService.js Loads and forwards linked passes.
lib/​server/​services/​log/​createLog.js Validates and stores associations.
lib/​server/​services/​dataPasses/​getAllDataPassesByNameOrFail.js Resolves names or rejects missing passes.
lib/​public/​views/​Logs/​Create/​LogReplyModel.js Inherits parent data-pass names.
lib/​public/​views/​Logs/​Create/​LogCreationModel.js Tracks and submits names.
lib/​public/​views/​Logs/​Create/​logCreationComponent.js Adds the data-pass input.
lib/​domain/​entities/​Log.js Documents linked passes.
lib/​domain/​dtos/​CreateLogDto.js Accepts data-pass name arrays.
lib/​database/​tables/​logdatapasses.js Defines the join model.
lib/​database/​tables/​index.js Registers the join model.
lib/​database/​seeders/​20240112102500-log-data-passes.js Seeds sample associations.
lib/​database/​repositories/​LogDataPassesRepository.js Inserts associations.
lib/​database/​repositories/​index.js Exports the new repository.
lib/​database/​models/​typedefs/​SequelizeLog.js Documents the association.
lib/​database/​models/​log.js Defines the many-to-many relationship.
lib/​database/​migrations/​v1/​20261010100000-create-log-data-passes.js Creates the join table.
lib/​database/​adapters/​LogAdapter.js Serializes linked passes.
lib/​database/​adapters/​index.js Connects the data-pass adapter.
lib/​database/​adapters/​DataPassAdapter.js Adds compact identification output.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/server/services/dataPasses/getAllDataPassesByNameOrFail.js Outdated
Comment thread lib/server/services/log/LogService.js
@graduta
graduta merged commit c3065b8 into main Oct 16, 2026
41 of 43 checks passed
@graduta
graduta deleted the feature/O2B-1626/log-creation-to-link-to-data-passes branch October 16, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants