Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for an externalIdentifier for agents across the stack (DB → backend API/DTOs → frontend UI), and introduces a dedicated agent detail page to view/edit agent metadata.
Changes:
- Backend: add
externalIdentifiertoAgentdomain model and DTOs, update service update logic, and add Flyway migration. - Frontend: display
externalIdentifierin the agents list and add an Agent Detail view for editing agent name/external identifier. - Tests: extend agent controller integration tests to cover reading/updating
externalIdentifierand consolidate test setup via@IntegrationTest.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| server/frontend/src/views/UserDetailView.vue | Template formatting change for role badges. |
| server/frontend/src/views/QualityCheckDetailView.vue | Minor template/formatting adjustments. |
| server/frontend/src/views/AgentsView.vue | Replace list UI with a table that includes externalIdentifier. |
| server/frontend/src/views/AgentReportView.vue | Add navigation to Agent Detail; adjust route param handling and back navigation. |
| server/frontend/src/views/AgentInteractionsView.vue | Make agent id param handling compatible with updated routing. |
| server/frontend/src/views/AgentDetailView.vue | New detail/edit page for agent name and externalIdentifier. |
| server/frontend/src/router/index.js | Add /agents/:id detail route; change reports route param name. |
| server/frontend/src/components/Badge.vue | Formatting-only change. |
| server/backend/src/test/java/eu/bbmri_eric/quality/server/dataquality/impl/AgentControllerTest.java | Switch to @IntegrationTest and add externalIdentifier integration tests. |
| server/backend/src/main/resources/db/migration/V1.2__add_external_identifier_to_agent.sql | Flyway migration adding external_identifier column. |
| server/backend/src/main/java/eu/bbmri_eric/quality/server/dataquality/impl/AgentServiceImpl.java | Allow updating externalIdentifier via PATCH. |
| server/backend/src/main/java/eu/bbmri_eric/quality/server/dataquality/dto/AgentUpdateRequest.java | Add externalIdentifier field to update request DTO. |
| server/backend/src/main/java/eu/bbmri_eric/quality/server/dataquality/dto/AgentDTO.java | Add externalIdentifier field to agent response DTO. |
| server/backend/src/main/java/eu/bbmri_eric/quality/server/dataquality/domain/Agent.java | Persist externalIdentifier and include it in equals/hashCode. |
Comment on lines
+78
to
+79
| if (!Objects.isNull(updateAgentDto.getExternalIdentifier())) { | ||
| agent.setExternalIdentifier(updateAgentDto.getExternalIdentifier()); |
| const agentId = ref(route.params.id); | ||
|
|
||
| const agent = ref(null); | ||
| const loading = ref(false); |
| try { | ||
| const agentData = { | ||
| name: form.name.trim() || null, | ||
| externalIdentifier: form.externalIdentifier.trim() || null, |
Comment on lines
+158
to
+160
| const validationErrors = reactive({ | ||
| name: '', | ||
| }); |
Comment on lines
+113
to
+120
| <table class="table table-hover mb-0 align-middle"> | ||
| <thead class="table-light"> | ||
| <tr> | ||
| <th class="ps-4">ID</th> | ||
| <th>Name</th> | ||
| <th>External Identifier</th> | ||
| <th class="text-center">Status</th> | ||
| </tr> |
| meta: { requiresAuth: true, title: 'Agent Detail' }, | ||
| }, | ||
| { | ||
| path: '/agents/:agentId/reports', |
| @ActiveProfiles("test") | ||
| @IntegrationTest | ||
| @Transactional | ||
| class AgentControllerIntegrationTest { |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #368 +/- ##
=========================================
Coverage 59.17% 59.17%
Complexity 324 324
=========================================
Files 83 83
Lines 1695 1695
Branches 129 129
=========================================
Hits 1003 1003
Misses 643 643
Partials 49 49
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request:
Description:
This pull request introduces support for an external identifier for agents throughout the backend and frontend. The main changes include updates to the database schema, backend models, DTOs, and API logic, as well as enhancements to the frontend to display and edit the external identifier. It also adds a dedicated agent detail view and improves routing and test coverage.
Backend changes:
externalIdentifierfield to theAgententity, DTOs (AgentDTO,AgentUpdateRequest), and included it in equality and hash code logic. [1] [2] [3] [4] [5] [6] [7]external_identifiercolumn to theagenttable.AgentServiceImplto allow updating the external identifier via the API.Frontend changes:
AgentDetailView.vuecomponent for viewing and editing agent details, including the external identifier./agents/:idfor the agent detail view and adjusted routes for agent reports and interactions. [1] [2] [3] [4]AgentReportView.vueto include a button linking to the agent detail view and improved navigation logic. [1] [2] [3]Testing:
@IntegrationTestannotation for improved consistency.Checklist:
Make sure you tick all the boxes below if they are true or do not apply before you ask for review