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

Made slug url case insensitive , Fixed bug with wrong query join for submission #2321

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

saravanpa-aot
Copy link
Collaborator

@saravanpa-aot saravanpa-aot commented Oct 23, 2023

Issue #: https://github.com/bcgov/met-public/issues/

Description of changes:

  • add the find by method for slug to behave case-insensitive..so that something like engage.eao.gov.bc.ca/my-test-eng and engage.eao.gov.bc.ca/MY-TEST-ENG works
  • removed some unnecessary print statements
  • Handled big with submission fetch.. the query was fetching multiple records of submissions since it was doing an inner join with comments table and there for it messed up the pagination/sort order etc.Handled it in a different way so that no join is manually done.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the met-public license (Apache 2.0).

Fixed bug with wrong query join for submission
@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2023

Codecov Report

Merging #2321 (e031aa1) into main (f7e3ac7) will increase coverage by 0.00%.
The diff coverage is 50.00%.

@@           Coverage Diff           @@
##             main    #2321   +/-   ##
=======================================
  Coverage   68.56%   68.56%           
=======================================
  Files         472      472           
  Lines       15593    15590    -3     
  Branches     1193     1193           
=======================================
- Hits        10691    10689    -2     
+ Misses       4693     4692    -1     
  Partials      209      209           
Flag Coverage Δ
metapi 76.78% <50.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
met-api/src/met_api/models/engagement_slug.py 100.00% <100.00%> (ø)
met-api/src/met_api/schemas/engagement.py 94.82% <ø> (+1.38%) ⬆️
met-api/src/met_api/models/comment.py 73.28% <0.00%> (ø)

@sonarcloud
Copy link

sonarcloud bot commented Oct 23, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@saravanpa-aot saravanpa-aot temporarily deployed to dev October 23, 2023 06:22 — with GitHub Actions Inactive
@saravanpa-aot saravanpa-aot merged commit 8db7879 into main Oct 23, 2023
13 checks passed
@saravanpa-aot saravanpa-aot deleted the sortorder branch October 23, 2023 20:46
NatSquared added a commit that referenced this pull request Oct 26, 2023
* Made slug url case insensitive , Fixed bug with wrong query join for submission (#2321)

* Made slug url case insensitive ,
Fixed bug with wrong query join for submission

* removed a couple of if statements

* CSV export made working for multipage wizard surveys (#2322)

---------

Co-authored-by: saravanpa-aot <[email protected]>
NatSquared added a commit that referenced this pull request Dec 12, 2023
* Add initial version of change log (#2318)

* Feature/update sample env files (#2320)

* Remove old production .env file

* Update DEVELOPMENT.md to reflect project state

* Update CHANGELOG.md before PR

* Link JIRA ticket # on relevant changes

* Bring bugfixes from main into gdx-dev (#2328)

* Made slug url case insensitive , Fixed bug with wrong query join for submission (#2321)

* CSV export made working for multipage wizard surveys (#2322)

---------

Co-authored-by: saravanpa-aot <[email protected]>

* bugfix/deseng421: Changed engagement links so that they open in the same window/tab as opposed to a new one. (#2329)

* Merge SSO and dev changes into gdx-main (#2343)

* Bugfix/deseng413 (#2330)

* bugfix/deseng413: Upgraded BC-Sans font to newest version.

* bugfix/deseng413: Small update to changelog for clarification.

* Feature: SSO Migration - DESENG #408 (#2333)

* Make role checks platform-agnostic

* default to standard realm

* Remove local Keycloak instances and config

* Use tenant information from DB instead of Keycloak

* Update sample.env files

* Clean up the changelog... and we're good to go! 🥳

* [DESENG-414] .env var (and config) audit and cleanup (#2339)

* Overhaul of most configuration files

* No longer using semver; update CHANGELOG.MD

* Feature/deseng415 (#2334)

* feature/deseng415: Added recording of date with feedback submission and displaying the data on admin side.

* feature/deseng415: Fixed feedback schema, removed yup import, fixed change log date.

* bugfix/deseng429: Removed outdated service class. (#2337)

* bugfix/deseng429: Changed version and changelog to match deployments to gdx-main.

* DESENG-438 Superusers can publish engagements without attached surveys (#2338)

* DESENG-441 Remove unused engagement metadata fields (#2340)

* Fixed merge errors in the changelog

---------
Co-authored-by: saravanpa-aot <[email protected]>
Co-authored-by: jareth-whitney <[email protected]>
Co-authored-by: Baelx <[email protected]>
Co-authored-by: Alex <[email protected]>
Thank you, everyone!
---------
jareth-whitney added a commit that referenced this pull request Jan 9, 2024
…m Main (#2347)

* Add initial version of change log (#2318)

Add a change log to allow developers to log any changes they make to the project.

* Feature/update sample env files (#2320)

* Feature: update sample .env files

* Remove old production .env file

* Update DEVELOPMENT.md to reflect project state

* Update CHANGELOG.md before PR

* Link JIRA ticket # on relevant changes

* Bring bugfixes from main into gdx-dev (#2328)

* Made slug url case insensitive , Fixed bug with wrong query join for submission (#2321)

* Made slug url case insensitive ,
Fixed bug with wrong query join for submission

* removed a couple of if statements

* CSV export made working for multipage wizard surveys (#2322)

---------

Co-authored-by: saravanpa-aot <[email protected]>

* bugfix/deseng421: Changed engagement links so that they open in the same window/tab as opposed to a new one. (#2329)

* Bugfix/deseng413 (#2330)

* bugfix/deseng413: Upgraded BC-Sans font to newest version.

* bugfix/deseng413: Small update to changelog for clarification.

* Feature/deseng415 (#2334)

* feature/deseng415: Added recording of date with feedback submission and displaying the data on admin side.

* feature/deseng415: Fixed feedback schema, removed yup import, fixed change log date.

* bugfix/deseng429: Removed outdated service class. (#2337)

* bugfix/deseng429: Removed outdated service class.

* bugfix/deseng429: Changed version and changelog to match deployments to gdx-main.

* feature/deseng439: Finished the Timeline Widget and linted.

* feature/deseng439: Updated changelog before merge.

* feature/deseng439: Made revisions as per Alex and added sorting to React components.

---------

Co-authored-by: Nat² <[email protected]>
Co-authored-by: saravanpa-aot <[email protected]>
NatSquared added a commit that referenced this pull request Jan 19, 2024
…m Main (#2347)

* Add initial version of change log (#2318)

Add a change log to allow developers to log any changes they make to the project.

* Feature/update sample env files (#2320)

* Feature: update sample .env files

* Remove old production .env file

* Update DEVELOPMENT.md to reflect project state

* Update CHANGELOG.md before PR

* Link JIRA ticket # on relevant changes

* Bring bugfixes from main into gdx-dev (#2328)

* Made slug url case insensitive , Fixed bug with wrong query join for submission (#2321)

* Made slug url case insensitive ,
Fixed bug with wrong query join for submission

* removed a couple of if statements

* CSV export made working for multipage wizard surveys (#2322)

---------

Co-authored-by: saravanpa-aot <[email protected]>

* bugfix/deseng421: Changed engagement links so that they open in the same window/tab as opposed to a new one. (#2329)

* Bugfix/deseng413 (#2330)

* bugfix/deseng413: Upgraded BC-Sans font to newest version.

* bugfix/deseng413: Small update to changelog for clarification.

* Feature/deseng415 (#2334)

* feature/deseng415: Added recording of date with feedback submission and displaying the data on admin side.

* feature/deseng415: Fixed feedback schema, removed yup import, fixed change log date.

* bugfix/deseng429: Removed outdated service class. (#2337)

* bugfix/deseng429: Removed outdated service class.

* bugfix/deseng429: Changed version and changelog to match deployments to gdx-main.

* feature/deseng439: Finished the Timeline Widget and linted.

* feature/deseng439: Updated changelog before merge.

* feature/deseng439: Made revisions as per Alex and added sorting to React components.

---------

Co-authored-by: Nat² <[email protected]>
Co-authored-by: saravanpa-aot <[email protected]>
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.

3 participants