Mateusz Kwiatkowski

I see that if a statement is located in StockCardSummariesService so it should be tested in this class as it should be done while writing unit tests. If you are testing it below it should be moved ...

I see that if a statement is located in StockCardSummariesService so it should be tested in this class as it should be done while writing unit tests. If you are testing it below it should be moved to another test method.

I think it should have tests in the repository test class where you would test this method with different data and parameters. I don't see such tests. Sonar only says if code line is used while exe...

I think it should have tests in the repository test class where you would test this method with different data and parameters. I don't see such tests. Sonar only says if code line is used while executing tests, not if it is tested properly.

I'm not sure why there is no separate test to verify if empty startDate is handled properly

I'm not sure why there is no separate test to verify if empty startDate is handled properly

This requires some tests

This requires some tests

We are submitting physical inventory for day 1 with quantity 50, current SoH for day 1 is 10, after recalculation, it should be changed to 50. From those 2 numbers, we can calculate that the differ...

We are submitting physical inventory for day 1 with quantity 50, current SoH for day 1 is 10, after recalculation, it should be changed to 50. From those 2 numbers, we can calculate that the difference between old SoH and submitted physical inventory is +40. Then we need to update all following days with the difference calculated, so previously day 2 had SoH 20, now it is 60, day 3 had SoH 30, now it has 70.

OLMIS-6483: fixed date filed name in migration script
OLMIS-6483: fixed date filed name in migration script
OLMIS-6483: added calculating soh fact table for physical inventory
OLMIS-6483: added calculating soh fact table for physical inventory
OLMIS-6483: fixed updating calculated SOH with debit reasons
OLMIS-6483: fixed updating calculated SOH with debit reasons
OLMIS-6530: Fixed problem with clearing freshly initiated requisition form after printing it
OLMIS-6530: Fixed problem with clearing freshly initiated requisition form after printing it
changed notification service version to 4.1.2-SNAPSHOT
changed notification service version to 4.1.2-SNAPSHOT
OLMIS-6193: fixed translating stockout notifications
OLMIS-6193: fixed translating stockout notifications
As I mentioned on Slack while doing using a @Async new thread is losing context by default. We are getting locale info from LocaleContextHolder while translating messages so this was causing missin...

As I mentioned on Slack while doing using a @Async new thread is losing context by default. We are getting locale info from LocaleContextHolder while translating messages so this was causing missing translations for email notifications. Here is a GitHub issue regarding this problem: https://github.com/spring-projects/spring-boot/issues/14079
I think we are safe to use "dispatcherServlet.setThreadContextInheritable(true);" but Javadoc says:
/**

  • Set whether to expose the LocaleContext and RequestAttributes as inheritable
  • for child threads (using an
    Unknown macro: {@link java.lang.InheritableThreadLocal}

    ).

  • <p>Default is "false", to avoid side effects on spawned background threads.
  • Switch this to "true" to enable inheritance for custom child threads which
  • are spawned during request processing and only used for this request
  • (that is, ending after their initial task, without reuse of the thread).
  • <p><b>WARNING:</b> Do not use inheritance for child threads if you are
  • accessing a thread pool which is configured to potentially add new threads
  • on demand (e.g. a JDK
    Unknown macro: {@link java.util.concurrent.ThreadPoolExecutor}

    ),

  • since this will expose the inherited context to such a pooled thread.
    */
    Alternatively, we could retrieve locale before starting a new thread and passing it there, but it would require more work.
    I would be nice if we could agree on a solution quickly as it is blocking release and I still need to include it in patch release for Angola. Also, I would need to include those changes in other services that are sending notifications asynchronously.
OLMIS-6193: added inheriting context to dispatcher servlet
OLMIS-6193: added inheriting context to dispatcher servlet