Project

General

Profile

Actions

Defect #1430

closed

Contract with highest "valid from" is returned as prime contract

Added by Alena Peterová over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Radek Tomiška
Category:
Contractual relationship
Target version:
Start date:
12/20/2018
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

Description

Version: 9.3.1

When computing prime contract and no contract is set as "main position", then the contract with lowest "valid from" should be returned according to doc ( https://wiki.czechidm.com/devel/documentation/identities/dev/contractual-relationship#prime_contract_position).

But the contract with highest "valid from" is returned.

Affected functions:
  • bulk role assignment (when using "Assign to main contract only"]
  • default role for synchronization is assigned only to prime contract
  • groovy scripts that use identityContractService.getPrimeContract or getPrimeValidContract
Actions #1

Updated by Alena Peterová over 5 years ago

  • Target version set to Onyx (9.3.3)

If possible, would you please include fix to 9.3.3? It would save a lot of project-specific implementation if we could use the default strategy of computing prime contract (= lowest valid from).

Actions #2

Updated by Radek Tomiška over 5 years ago

  • Status changed from New to In Progress
Actions #3

Updated by Radek Tomiška over 5 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Radek Tomiška to Ondřej Kopr
  • % Done changed from 0 to 90

I fixed behavior of computing prime contract, there was wrong comparing of valid from dates:
https://github.com/bcvsolutions/CzechIdMng/commit/a12db58f1e926c94e0927f47841597ec1ebe70e3

Could you do a feedback, please?

Note: the unit test was created for this before, but the issue was hidden, because invalid test contract was created :/

Actions #4

Updated by Ondřej Kopr over 5 years ago

  • Assignee changed from Ondřej Kopr to Radek Tomiška
  • % Done changed from 90 to 100

Thanks for update behavior for computed prime contract. Now it works as is described in ticket.

For example:
  • Contract [id:1] validTill: 1.1. 2019, validTill: 15.1. 2019,
  • contract [id:2] validTill: 9.1. 2019, validTill: 1.1. 2025.

As primary contract is used contract with id: 1. This behavior is wanted by the ticket.

Actions #5

Updated by Radek Tomiška over 5 years ago

  • Status changed from Needs feedback to Closed
Actions

Also available in: Atom PDF