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

feat(certificate): enhance company certificate db attributes and API details #823

Conversation

AnuragNagpure
Copy link
Contributor

Description

Need to add additional parameters in company_certificate(externalcertificatenumber, sites, validfrom, validtill, issuer, validator) table along with additional table companies_certificate_assigned_sites to link mutiple sites(BPNS) with comapanycertificate id.

After changes in db need to change Post and get endpoints as mentioned below:
POST: api/administration/companydata/companyCertificate
GET /api/administration/companydata/companyCertificates
GET: api/administration/companydata/businessPartnerNumber}/companyCertificates

Also validation added parameters also need to implement.

Why

For tracking multiple BPNS against companies this implementation is required.

Issue

#574

Checklist

Please delete options that are not relevant.

  • I have followed the contributing guidelines
  • I have performed a self-review of my own code
  • I have successfully tested my changes locally
  • I have added tests that prove my changes work
  • I have checked that new and existing tests pass locally with my changes
  • I have commented my code, particularly in hard-to-understand areas

@AnuragNagpure AnuragNagpure changed the title Feature/574 certificate management db enhancement feature(certificate): enhance company certificate db attributes and API details Jul 4, 2024
@AnuragNagpure AnuragNagpure changed the title feature(certificate): enhance company certificate db attributes and API details feat(certificate): enhance company certificate db attributes and API details Jul 4, 2024
{
Id = id;
ValidFrom = validFrom;
CompanyCertificateTypeId = companyCertificateTypeId;
CompanyCertificateStatusId = companyCertificateStatusId;
CompanyId = companyId;
DocumentId = documentId;
CompaniesCertificateAssignedSites = new HashSet<CompaniesCertificateAssignedSite>();

Check warning

Code scanning / CodeQL

Virtual call in constructor or destructor Warning

Avoid virtual calls in a constructor or destructor.
Copy link
Contributor

@evegufy evegufy left a comment

Choose a reason for hiding this comment

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

Hi @AnuragNagpure could you please solve the codeql finding and clarify the milestone of the #574 with @jjeroch , currently still set to our already released 2.0.0 version ...

@AnuragNagpure AnuragNagpure force-pushed the feature/574-certificate-management-db-enhancement branch from 92dd83e to 50b09db Compare July 16, 2024 07:16
@ntruchsess ntruchsess force-pushed the feature/574-certificate-management-db-enhancement branch 3 times, most recently from 658d548 to 0c75148 Compare July 16, 2024 13:21
ntruchsess
ntruchsess previously approved these changes Jul 16, 2024
@ntruchsess ntruchsess force-pushed the feature/574-certificate-management-db-enhancement branch from 0c75148 to e3d24de Compare July 16, 2024 13:39
@ntruchsess ntruchsess force-pushed the feature/574-certificate-management-db-enhancement branch from e3d24de to 6ba71d3 Compare July 16, 2024 15:28
@ntruchsess
Copy link
Contributor

Hi @AnuragNagpure could you please solve the codeql finding and clarify the milestone of the #574 with @jjeroch , currently still set to our already released 2.0.0 version ...

I dismissed the codeql-finding as false positive (see comment)

@AnuragNagpure
Copy link
Contributor Author

Hi @AnuragNagpure could you please solve the codeql finding and clarify the milestone of the #574 with @jjeroch , currently still set to our already released 2.0.0 version ...

I dismissed the codeql-finding as false positive (see comment)

Hi @ntruchsess its milestone is set as 24.12

Copy link
Contributor

@ntruchsess ntruchsess left a comment

Choose a reason for hiding this comment

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

@AnuragNagpure @jjeroch : in the ticket #574 the validator field is specified as 'The validator is given by the company ID'. Please clarify whether the column in database and the corresponding field in the endpoint's payload should be GUID or string (the PR currently implements string but this seems to be in conflict with the ticket).

Other than that the PR is fine. I did adjust the entities names (Companies -> Company) as the specified names were in conflict with existing naming conventions. (I also left a comment in the ticket about this). You need to pull my changes before applying further commits

@AnuragNagpure
Copy link
Contributor Author

AnuragNagpure commented Jul 18, 2024

@AnuragNagpure @jjeroch : in the ticket #574 the validator field is specified as 'The validator is given by the company ID'. Please clarify whether the column in database and the corresponding field in the endpoint's payload should be GUID or string (the PR currently implements string but this seems to be in conflict with the ticket).

Other than that the PR is fine. I did adjust the entities names (Companies -> Company) as the specified names were in conflict with existing naming conventions. (I also left a comment in the ticket about this). You need to pull my changes before applying further commits

Hi @ntruchsess as per my discussion with @jjeroch it should be string only currently we will get this field as null. In future there will be use of validator, We only have to add it in Get Endpoint response.

@ntruchsess ntruchsess dismissed evegufy’s stale review July 19, 2024 09:30

codeql-finding was dismissed

@ntruchsess ntruchsess merged commit f0d4cad into eclipse-tractusx:main Jul 19, 2024
10 checks passed
@ntruchsess ntruchsess deleted the feature/574-certificate-management-db-enhancement branch July 19, 2024 09:32
Phil91 pushed a commit that referenced this pull request Jul 30, 2024
…details (#823)

* additional attributes added
* migration files with updated attributes added
* implementation of additional added fields in company certificate table with changes in respective endpoints is done
* tests: adjust unit tests for companyCertificates
* Changes for BPNS implementation with updated test cases added
* update version for framework.model
Refs: #574
---------
Co-authored-by: Phil Schneider <info@philschneider.de>
Co-authored-by: Norbert Truchsess <norbert.truchsess@t-online.de>
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.

Certificate Management - enhance db attributes and API details
4 participants