Skip to content

API - NOC Events & Created Date Update#663

Merged
shaangill025 merged 12 commits intobcgov:mainfrom
shaangill025:fix_26983
Apr 8, 2025
Merged

API - NOC Events & Created Date Update#663
shaangill025 merged 12 commits intobcgov:mainfrom
shaangill025:fix_26983

Conversation

@shaangill025
Copy link
Copy Markdown
Contributor

@shaangill025 shaangill025 commented Apr 4, 2025

Issue:

Description of changes:
Also added an is-assignee check endpoint which is required for assign and unassign workflow in Examiner UI.

(Verified that time being shown is in Pacific even though system time is in EST)
image

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the BC Registry and Digital Services BSD 3-Clause License

@shaangill025

This comment was marked as outdated.

event_name = db.Column(db.Enum(EventName), nullable=False)
details = db.Column(db.String, nullable=True)
created_date = db.Column(db.DateTime, nullable=False, server_default=text("(NOW())"))
created_date = db.Column(db.DateTime(timezone=True), nullable=False, server_default=text("(NOW())"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this getting stored in UTC? Looks like it may be using the tz of db server

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is getting stored in UTC but it doesn't have the offset as it timezone aware which is causing issues when converting it in the UI.

start_date = db.Column(db.DateTime(timezone=True), nullable=False)
end_date = db.Column(db.DateTime(timezone=True), nullable=False)
creation_date = db.Column(db.DateTime, nullable=False, server_default=text("(NOW())"))
creation_date = db.Column(db.DateTime(timezone=True), nullable=False, server_default=text("(NOW())"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think I need to remove this column because these are present in the base model

application.status = Application.Status.NOC_PENDING
application.save()
EmailService.send_notice_of_consideration_for_application(application)
reviewer = UserService.get_or_create_user_in_context()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is already done at the resource level. Passing reviewer_id will avoid the extra look up

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@kris-daxiom
Copy link
Copy Markdown
Contributor

@kris-daxiom This is ready for review. The unit test is failing because:

strr-api = {git = "https://github.com/bcgov/STRR.git", rev = "main", subdirectory = "strr-api"}

Locally, I tested with strr-api = {git = "https://github.com/shaangill025/STRR.git", rev = "fix_26983", subdirectory = "strr-api"} image

You will have merge the api code first and then update the api version in the job and commit that poetry lock file as well

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 8, 2025

@shaangill025
Copy link
Copy Markdown
Contributor Author

You will have merge the api code first and then update the api version in the job and commit that poetry lock file as well

@kris-daxiom #670

@shaangill025 shaangill025 merged commit 9a127aa into bcgov:main Apr 8, 2025
10 checks passed
kris-daxiom added a commit that referenced this pull request Apr 8, 2025
* feat: Registration Todos (#668)

* feat: Registration Todos

* Added Expired to the status array

* API - NOC Events & Created Date Update (#663)

* 26983 - events & timestamp type update

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>

* 26983 - lint fix

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>

* 26983 - nox_expiry unit test

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>

* 26983 - lint fix

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>

* 26983 - cleanup

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>

* 26983 - cleanup

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>

* 26983 - add UnitTestConfig to noc_expiry job conftest

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>

* 26983 - isort fix

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>

* 26983 - run mode fix

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>

* 26983 - run mode fix

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>

* 26983 - check assignee, feedback changes, remove noc_expiry job changes

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>

* 26983 - lint fixes

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>

---------

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>

* noc expiry timezone related fix & noc events (#664)

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>

* Fix scroll in NOC To Do (#667)

* Fix scroll in NOC To Do

* ci-cd (#671)

* indent (#673)

* add quote (#674)

* fix: Adding run script (#675)

---------

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
Co-authored-by: Shaanjot Gill <shaangill025@users.noreply.github.com>
Co-authored-by: Dima K <dima1086@hotmail.com>
Co-authored-by: Avni Salhotra <132402145+avni-work@users.noreply.github.com>
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.

2 participants