bcgov / digital_marketplace

The intent of this development is to build a product that will support digital procurement needs for the BC Government including services such as, but not limited to, Sprint With Us, Code With Us, The Procurement Concierge.
Apache License 2.0
13 stars 17 forks source link

DMM-407 Fix incorrect enumeration/display of proposal rankings #460

Closed sutherlanda closed 8 months ago

sutherlanda commented 8 months ago

This PR closes issue: https://bcdevex.atlassian.net/browse/DMM-407

This PR fixes 2 issues related to the display of proposal rankings when viewing an evaluated SWU or TWU opportunity:

  1. Proposal rankings were being calculated against an incorrect query that returned duplicates of the same proposal. There was an unnecessary join being performed that returned a record of the same proposal for each question/response present. The fix was to remove that join.

  2. Proposal rankings that were in the 'teens' -- between 10 and 20 -- were showing with incorrect suffixes (i.e. 11st). An exception for amounts in that range was added to the utility function, so that these rankings will show correctly (see screen grab for example).

Screenshot 2024-02-11 at 4 08 36 PM