Sebastian Brudziński

Merge pull request #1 from OpenLMIS/OLMIS-6621

OLMIS-6621: Recreate indexes

This wasn't broken in v3.6 - hence no change since 3.6

This wasn't broken in v3.6 - hence no change since 3.6

OLMIS-6566 Checks if lazy-loading in batch improves performance
OLMIS-6566 Checks if lazy-loading in batch improves performance
OLMIS-6566 Checks if lazy-loading in batch improves performance

This loop could use its own profiler, especially that it removes from a collection

This loop could use its own profiler, especially that it removes from a collection

1. This is making calls to the database in a loop. 2. This still seems to be over-complicated. There are only 2 steps required for regular requisitions - a) take all periods b) remove periods that ...

1. This is making calls to the database in a loop.
2. This still seems to be over-complicated.
There are only 2 steps required for regular requisitions - a) take all periods b) remove periods that have authorized+ requisition
Whatever is left after removing requisitions from step b) is our resulting list

1. This is making calls to the database (exists) in a loop 2. Do we even need this? It seems that all we need is to verify whether the requisition is preAuthorize or not - if yes, the period is val...

1. This is making calls to the database (exists) in a loop
2. Do we even need this? It seems that all we need is to verify whether the requisition is preAuthorize or not - if yes, the period is valid, if not, the period should not be displayed

Is this whole conversion necessary? Do we ever need to retrieve the status by id?

Is this whole conversion necessary? Do we ever need to retrieve the status by id?

Ah, that makes sense now (from this comment, not from the comments in the test though)

Ah, that makes sense now (from this comment, not from the comments in the test though)

TBH, I'm lost on why 50, 60 and 70 are expected here. Maybe it would be worth to extract those numbers to final variables and name them appropriately for clarity, or at the very least add some comm...

TBH, I'm lost on why 50, 60 and 70 are expected here. Maybe it would be worth to extract those numbers to final variables and name them appropriately for clarity, or at the very least add some comments

Removing the quiet flag

Yes

Yes

That would probably make sense, in case someone updates the wiremock version in the future

That would probably make sense, in case someone updates the wiremock version in the future

Added log statement when migration is finished

Good catch. Did you manage to check whether the same problem exists in other services too?

Good catch. Did you manage to check whether the same problem exists in other services too?

OLMIS-6569 Sonar doesn't like nulls

OLMIS-6569 Remove unnecesarry calls to fetch orderables
OLMIS-6569 Remove unnecesarry calls to fetch orderables
OLMIS-6569 Remove unnecesarry calls to fetch orderables

The POST /v2/initiate and GET /v2/requisition endpoints have been

modified so that they don't unnecessarily call the /orderables

endpoint anymore. Due to this change the response was slightly modified

and the list of available products is no longer split between

full- and non-full supply products.

OLMIS-6569 Remove unused imports