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

Rename order status column #3570

Merged
merged 25 commits into from
Sep 16, 2024
Merged

Rename order status column #3570

merged 25 commits into from
Sep 16, 2024

Conversation

islean
Copy link
Contributor

@islean islean commented Aug 15, 2024

Description

Part of https://github.com/Clinical-Genomics/cigrid-ui/issues/638. Renames the is_delivered column in Order to is_open and flips all the values. Needs to be merged with the FE changes in https://github.com/Clinical-Genomics/cigrid-ui/pull/691.

Added

Changed

  • The is_delivered column in Order is renamed to is_open with values flipped.

Fixed

How to prepare for test

  • Ssh to relevant server (depending on type of change)
  • Use stage: us
  • Paxa the environment: paxa
  • Install on stage (example for Hasta):
    bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-tool-stage.sh -e S_cg -t cg -b rename-order-status-column -a

How to test

  • Do ...

Expected test outcome

  • Check that ...
  • Take a screenshot and attach or copy/paste the output.

Review

  • Tests executed by
  • "Merge and deploy" approved by
    Thanks for filling in who performed the code review and the test!

This version is a

  • MAJOR - when you make incompatible API changes
  • MINOR - when you add functionality in a backwards compatible manner
  • PATCH - when you make backwards compatible bug fixes or documentation/instructions

Implementation Plan

  • Document in ...
  • Deploy this branch on ...
  • Inform to ...

@islean islean self-assigned this Aug 15, 2024
@islean islean mentioned this pull request Aug 19, 2024
15 tasks
@clingen-sthlm clingen-sthlm temporarily deployed to stage September 2, 2024 13:46 Inactive
@islean
Copy link
Contributor Author

islean commented Sep 2, 2024

Works on stage but need to check with the FE:

image

@islean
Copy link
Contributor Author

islean commented Sep 2, 2024

Works with the FE:

image

@islean islean marked this pull request as ready for review September 2, 2024 13:52
@islean islean requested a review from a team as a code owner September 2, 2024 13:52
Copy link
Contributor

@diitaz93 diitaz93 left a comment

Choose a reason for hiding this comment

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

Looks great! 💯

cg/services/orders/order_service/order_service.py Outdated Show resolved Hide resolved
cg/server/endpoints/orders.py Outdated Show resolved Hide resolved
cg/server/endpoints/orders.py Outdated Show resolved Hide resolved
cg/server/endpoints/orders.py Outdated Show resolved Hide resolved
@diitaz93 diitaz93 added the alembic migration Perform a change in database label Sep 4, 2024
@clingen-sthlm clingen-sthlm temporarily deployed to stage September 5, 2024 11:54 Inactive
@clingen-sthlm clingen-sthlm temporarily deployed to stage September 5, 2024 12:08 Inactive
@clingen-sthlm clingen-sthlm temporarily deployed to stage September 5, 2024 12:12 Inactive
@clingen-sthlm clingen-sthlm temporarily deployed to stage September 9, 2024 07:36 Inactive
@clingen-sthlm clingen-sthlm temporarily deployed to stage September 13, 2024 08:52 Inactive
Copy link

@islean islean merged commit f337181 into master Sep 16, 2024
9 checks passed
@islean islean deleted the rename-order-status-column branch September 16, 2024 09:33
@islean
Copy link
Contributor Author

islean commented Sep 16, 2024

Deployed to hasta and the VMs:

Log deploy... done.
cg, version 63.1.0
remote: Enumerating objects: 14, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 14 (delta 6), reused 9 (delta 4), pack-reused 0 (from 0)
Unpacking objects: 100% (14/14), done.
From https://github.com/Clinical-Genomics/cg
   9dbfb30..e957bea  master     -> origin/master
   5ca5457..0521273  patch_taxprofiler_versions -> origin/patch_taxprofiler_versions
 * [new tag]         v63.1.0    -> v63.1.0
Already on 'master'
Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Updating 9dbfb30..e957bea
Fast-forward
 .bumpversion.cfg                                                |  2 +-
 alembic/versions/2024_08_09_7770dcad8bde_rename_order_status.py | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 cg/__init__.py                                                  |  2 +-
 cg/server/admin.py                                              |  2 +-
 cg/server/dto/orders/order_delivery_update_request.py           |  2 +-
 cg/server/dto/orders/order_patch_request.py                     |  4 ++--
 cg/server/dto/orders/orders_request.py                          |  2 +-
 cg/server/dto/orders/orders_response.py                         |  2 +-
 cg/server/endpoints/orders.py                                   | 27 ++++++++++++---------------
 cg/services/orders/order_service/order_service.py               | 18 +++++++++---------
 cg/services/orders/order_service/utils.py                       |  4 ++--
 cg/store/crud/read.py                                           |  4 ++--
 cg/store/crud/update.py                                         |  6 +++---
 cg/store/filters/status_order_filters.py                        | 10 +++++-----
 cg/store/models.py                                              |  2 +-
 pyproject.toml                                                  |  2 +-
 16 files changed, 93 insertions(+), 46 deletions(-)
 create mode 100644 alembic/versions/2024_08_09_7770dcad8bde_rename_order_status.py
/home/isak.ohlsson
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade bb4c6dbad991 -> 7770dcad8bde, Rename order status
Revision ID: 7770dcad8bde
Revises: bb4c6dbad991
Create Date: 2024-08-09 09:47:47.814700
[isak.ohlsson@hasta:~] [P_base] $ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alembic migration Perform a change in database
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants