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

Реалізація можливості мержити контракти #116

Merged

Conversation

Krokop
Copy link
Contributor

@Krokop Krokop commented Oct 3, 2016

Додав модель AwardID, її функція зберігати ід смержених авардів, та перевіряти що аварда інсує, та має статус active.
Додав новий статус "merged" для контракта.
Додав поле additionalAwardIDs, в якому повинні зберігатися ід смержених авардів, та поле mergedInto де збереження ід контракта в який було смержено.
Додав валідацію для цих полів.
В utils винесена перевірка check_merged_contracts, яка перевіряє що конракти ще не були смержени, та мержить їх.
Також додано тести для перевірки нової функціональності.


This change is Reviewable

@coveralls
Copy link

coveralls commented Oct 3, 2016

Coverage Status

Coverage decreased (-0.2%) to 95.399% when pulling e024ef9 on Krokop:update_module_contract into 5d64dff on openprocurement:master.

@coveralls
Copy link

coveralls commented Oct 3, 2016

Coverage Status

Coverage decreased (-0.09%) to 95.48% when pulling 0d159e9 on Krokop:update_module_contract into 5d64dff on openprocurement:master.

@kroman0 kroman0 changed the base branch from master to merged_contracts October 3, 2016 18:16
@coveralls
Copy link

coveralls commented Oct 4, 2016

Coverage Status

Coverage increased (+0.01%) to 95.733% when pulling e2a78fd on Krokop:update_module_contract into 600317c on openprocurement:merged_contracts.

@coveralls
Copy link

coveralls commented Oct 4, 2016

Coverage Status

Coverage increased (+0.01%) to 95.733% when pulling fcc8e36 on Krokop:update_module_contract into 600317c on openprocurement:merged_contracts.

period = ModelType(Period)
value = ModelType(Value)
dateSigned = IsoDateTimeType()
documents = ListType(ModelType(Document), default=list())
items = ListType(ModelType(Item))
suppliers = ListType(ModelType(Organization), min_size=1, max_size=1)
date = IsoDateTimeType()
additionalAwardIDs = ListType(ModelType(AwardID), default=list())
Copy link
Contributor

Choose a reason for hiding this comment

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

Можливо краще щоб був простий перелік ідентифікаторів авардів а не AwardID модель. Таке можливо чи є якась складність?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Наприклад additionalAwardIDs = ListType(StringType, default=list()) ?

Copy link
Contributor

Choose a reason for hiding this comment

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

MD5Type було б ще краще

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Змінив StringType на MD5Type

update validation for additionalAwardIDs
update tests
@coveralls
Copy link

coveralls commented Oct 4, 2016

Coverage Status

Coverage increased (+0.06%) to 95.782% when pulling 37eb8c9 on Krokop:update_module_contract into 600317c on openprocurement:merged_contracts.

@coveralls
Copy link

coveralls commented Oct 4, 2016

Coverage Status

Coverage increased (+0.06%) to 95.782% when pulling d59a5d5 on Krokop:update_module_contract into 600317c on openprocurement:merged_contracts.

@kroman0 kroman0 merged commit c37c418 into openprocurement:merged_contracts Oct 4, 2016
@Krokop Krokop deleted the update_module_contract branch October 4, 2016 12:35
@kroman0
Copy link
Contributor

kroman0 commented Oct 5, 2016

  1. не знайшов змін щодо об'єднаних контрактів при скасуванні аварда - https://github.com/openprocurement/openprocurement.api/blob/merged_contracts/src/openprocurement/api/views/award.py#L324
  2. також бракує перевірки можливості підписати контракт по усіх авардах - https://github.com/openprocurement/openprocurement.api/blob/merged_contracts/src/openprocurement/api/views/contract.py#L84

@Krokop
Copy link
Contributor Author

Krokop commented Oct 5, 2016

  1. Такий функціонал не обговорювався. Якщо можливо то детальніше описати логіку або сценарій за яким це повинно відбуватися.

@kroman0
Copy link
Contributor

kroman0 commented Oct 5, 2016

Без таких поправок функціонал об'єдниних контрактів не повний. Контракт не може бути підписаний якщо умови не справджуються не тільки для основного аварда а й для додаткових.

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.

None yet

3 participants