Skip to content

Implement Request for Quotation endpoint for AVA process#612

Draft
Copilot wants to merge 9 commits intomainfrom
copilot/implement-quotation-request
Draft

Implement Request for Quotation endpoint for AVA process#612
Copilot wants to merge 9 commits intomainfrom
copilot/implement-quotation-request

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 7, 2025

Implements the quotation request step of the AVA (tendering, awarding, invoicing) process per GAEB specifications. Enables managers to request quotations from multiple contractors for an issue.

API Changes

New dedicated endpoint: /ticketing/v1/quotation-requests

POST /ticketing/v1/quotation-requests?issueId={id}

Request:

{
  "contractorIds": ["uuid-1", "uuid-2"],
  "description": "Optional free text"
}

Response: 201 Created with list of created quotation requests, one per contractor, with status VALID

GET /ticketing/v1/quotation-requests

Query parameters (all optional):

  • issueId - Filter by issue ID
  • contractorId - Filter by contractor ID
  • projectId - Filter by project ID

Response: 200 OK with list of quotation requests matching the filter criteria. Returns all accessible requests if no filter is provided.

DELETE /ticketing/v1/quotation-requests/{requestId}

Response: 204 No Content

Invalidates the quotation request by setting its status to INVALID (does not delete the record).

Authorization: Manager role required for all endpoints

Implementation

  • Database: New Cassandra table requests_for_quotation with composite key (project_id, request_id), indexes on issue_id and contractor_id
  • Domain model: QuotationRequestModel interface with Status enum (VALID/INVALID)
  • Entity layer: QuotationRequestEntity and QuotationRequestKey following existing Cassandra entity patterns
  • Repository: QuotationRequestRepository with find methods by issue, contractor, project, and request ID
  • Controller: QuotationRequestController with methods to create, retrieve, and invalidate quotation requests
  • Endpoint: Dedicated QuotationRequestEndpoint interface and QuotationRequestResource implementation
  • DTOs: Immutable JSON classes for request/response (CreateQuotationRequestJson, QuotationRequestJson, QuotationRequestListJson)
  • Liquibase migration: Schema changeset 005-create-requests-for-quotation-table.xml

Technical Notes

The implementation stores quotation requests with project, issue, contractor, trigger user, description, timestamp, and status fields. Each contractor receives a separate request record with unique request_id. The quotation request functionality is implemented as a separate, dedicated endpoint following the microservices architecture pattern used throughout the project.

Original prompt

This section details on the original issue you should resolve

<issue_title>Implement the Request for Quotation</issue_title>
<issue_description>### Description

Discussion

#609

Motivation

The tendering, awarding, and invoicing (AVA) process comprises several steps, which are described in detail by the Joint Committee for Electronics in Construction (GAEB). This issue aims to implement the process step for a client to request a bidder to submit a request for a quotation.

Implementation

A manager can initiate this process step by executing an HTTP POST request to ../issues/{issueId}/quotation-request. This request passes a list of contractor IDs. A separate "Request for Quotation" is created for each contractor.

A "Request for Quotation" is an entry in the Cassandra database. A new table named requests_for_quotation must be created for this purpose. The table must contain information about the project, the issue, the trigger of the request, the contractor, as well as free text, a timestamp, and a status (valid/invalid).</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Dec 7, 2025
Copilot AI and others added 4 commits December 7, 2025 06:53
Co-authored-by: astanik <7569599+astanik@users.noreply.github.com>
Co-authored-by: astanik <7569599+astanik@users.noreply.github.com>
Co-authored-by: astanik <7569599+astanik@users.noreply.github.com>
Co-authored-by: astanik <7569599+astanik@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement the request for quotation process Implement Request for Quotation endpoint for AVA process Dec 7, 2025
Copilot AI requested a review from astanik December 7, 2025 07:16
@astanik
Copy link
Copy Markdown
Contributor

astanik commented Dec 7, 2025

@copilot Please create a separate endpoint and resource for the "Request for Quotation" functionality. Extend this endpoint with an HTTP GET request to retrieve all "Request for Quotation" requests, and a DELETE request with the request ID to invalidate the request.

Copilot AI and others added 2 commits December 7, 2025 11:07
… methods

Co-authored-by: astanik <7569599+astanik@users.noreply.github.com>
Co-authored-by: astanik <7569599+astanik@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Dec 7, 2025

@copilot Please create a separate endpoint and resource for the "Request for Quotation" functionality. Extend this endpoint with an HTTP GET request to retrieve all "Request for Quotation" requests, a...

I've created a separate endpoint for Request for Quotation functionality as requested:

New endpoint: /ticketing/v1/quotation-requests

Added methods:

  • POST /ticketing/v1/quotation-requests?issueId={id} - Create quotation requests for an issue
  • GET /ticketing/v1/quotation-requests - Retrieve all quotation requests (with optional filters: issueId, contractorId, projectId)
  • DELETE /ticketing/v1/quotation-requests/{requestId} - Invalidate a quotation request (sets status to INVALID)

The quotation request functionality has been completely removed from IssueEndpoint and moved to the dedicated QuotationRequestEndpoint interface with its own QuotationRequestResource implementation.

Commits: 692151b, 651b652

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • repo.gradle.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -classpath /home/REDACTED/work/remsfal-backend/remsfal-backend/.mvn/wrapper/maven-wrapper.jar -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/remsfal-backend/remsfal-backend org.apache.maven.wrapper.MavenWrapperMain clean compile -DskipTests (dns block)
  • repository.jboss.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -classpath /home/REDACTED/work/remsfal-backend/remsfal-backend/.mvn/wrapper/maven-wrapper.jar -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/remsfal-backend/remsfal-backend org.apache.maven.wrapper.MavenWrapperMain clean compile -DskipTests (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
28.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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.

Implement the Request for Quotation

2 participants