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

Allow Products with multiple projects #3578

Merged
merged 9 commits into from
Nov 8, 2023

Conversation

FuriousLlama
Copy link
Collaborator

No description provided.

@FuriousLlama FuriousLlama added the enhancement New feature or request label Nov 8, 2023
@FuriousLlama FuriousLlama self-assigned this Nov 8, 2023
Copy link
Contributor

github-actions bot commented Nov 8, 2023

✅ No secrets were detected in the code.

Copy link

codecov bot commented Nov 8, 2023

Codecov Report

Merging #3578 (c999370) into dev (82cd1cf) will decrease coverage by 0.03%.
The diff coverage is 66.43%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #3578      +/-   ##
==========================================
- Coverage   69.59%   69.57%   -0.03%     
==========================================
  Files        1370     1371       +1     
  Lines       33751    33859     +108     
  Branches     6283     6290       +7     
==========================================
+ Hits        23489    23557      +68     
- Misses      10011    10049      +38     
- Partials      251      253       +2     
Flag Coverage Δ
unittests 69.57% <66.43%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...pi/Areas/Projects/Controllers/ProjectController.cs 67.44% <100.00%> (ø)
.../backend/api/Models/Concepts/Product/ProductMap.cs 100.00% <100.00%> (ø)
.../backend/api/Models/Concepts/Project/ProjectMap.cs 100.00% <100.00%> (ø)
...d/api/Models/Concepts/Project/ProjectProductMap.cs 100.00% <100.00%> (ø)
...res/mapSideBar/project/add/AddProjectContainer.tsx 100.00% <100.00%> (ø)
...features/mapSideBar/project/add/ProductSubForm.tsx 100.00% <100.00%> (ø)
...eBar/project/hooks/useAddProjectFormManagement.tsx 94.73% <100.00%> (ø)
...frontend/src/features/mapSideBar/project/models.ts 93.24% <100.00%> (+0.38%) ⬆️
.../tabs/projectDetails/detail/ProjectProductView.tsx 92.30% <100.00%> (+2.30%) ⬆️
.../tabs/projectDetails/detail/ProjectSummaryView.tsx 88.88% <100.00%> (ø)
... and 11 more

Copy link
Contributor

github-actions bot commented Nov 8, 2023

✅ No secrets were detected in the code.

Copy link
Contributor

github-actions bot commented Nov 8, 2023

✅ No secrets were detected in the code.

@devinleighsmith
Copy link
Collaborator

tested h179, h120, and h0774 and h0443 form templates to ensure project printed correctly, appears to be working.

@devinleighsmith
Copy link
Collaborator

Also tested project export, looks good.

@devinleighsmith
Copy link
Collaborator

also tested alternate project and acquisition list view project search, that is working.

@devinleighsmith
Copy link
Collaborator

project advanced search also working.

.Inherits<Entity.IBaseEntity, BaseModel>();

config.NewConfig<ProjectProductModel, Entity.PimsProjectProduct>()
.Map(dest => dest.ProjectProductId, src => src.Id)
Copy link
Collaborator

Choose a reason for hiding this comment

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

seems like an unusual mixture of fields here (one id and then one entity), is there a reason why that is necessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I assumed the id would be coming on the object. I've added the id from the field as well

@@ -113,11 +115,11 @@ public IActionResult GetAll()
[ProducesResponseType(typeof(ProjectModel), 200)]
[ProducesResponseType(typeof(Api.Models.ErrorResponseModel), 400)]
[SwaggerOperation(Tags = new[] { "project" })]
public IActionResult AddProject(ProjectModel projectModel)
public IActionResult AddProject(ProjectModel projectModel, [FromQuery] string[] userOverrideCodes)
Copy link
Collaborator

@devinleighsmith devinleighsmith Nov 8, 2023

Choose a reason for hiding this comment

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

what happens if the frontend doesn't provide this query param? does the controller interpret this as an empty array?

Updates the passed project with the matched products in place.
Note: The return list contains the external products matched
*/
private List<PimsProduct> MatchProducts(PimsProject project)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This function does seem like one we should have good test coverage on (via the public method).

@devinleighsmith
Copy link
Collaborator

@FuriousLlama the estimate dates on products to not appear to work.

@devinleighsmith
Copy link
Collaborator

always gets reset to empty string:
image

Copy link
Contributor

github-actions bot commented Nov 8, 2023

✅ No secrets were detected in the code.

Copy link
Contributor

github-actions bot commented Nov 8, 2023

✅ No secrets were detected in the code.

Copy link
Contributor

github-actions bot commented Nov 8, 2023

✅ No secrets were detected in the code.

Copy link
Contributor

github-actions bot commented Nov 8, 2023

✅ No secrets were detected in the code.

@FuriousLlama FuriousLlama merged commit 8b6330a into bcgov:dev Nov 8, 2023
8 of 9 checks passed
@FuriousLlama FuriousLlama deleted the features/psp-6959 branch December 15, 2023 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants