reapit / foundations

Foundations platform mono repo
57 stars 21 forks source link

Lettings offers not returned by the api #9680

Closed gareth-evans closed 8 months ago

gareth-evans commented 10 months ago

Describe the bug Offers created for a lettings property (MYS230079) in RPS are not returned in the api call to https://platform.reapit.cloud/offers/?propertyId=MYS230079.

However, an offer created using the api is returned from https://platform.reapit.cloud/offers/?propertyId=MYS230079.

I've also tried https://platform.reapit.cloud/tenancies/?propertyId=MYS230079 as offers for lettings are listed under Tenancy. But that returns no results for the property.

To Reproduce

  1. Create a lettings property
  2. Add an offer in RPS
  3. Call /offers endpoint with the property ID as a filter

Expected behaviour A clear and concise description of what you expected to happen.

Screenshots image

Specification

GET /tenancies/offers (paged result) GET /tenanies/offers/{id}

{
  "id": "OXF2000001",
  "created": "2018-12-12T12:30:23Z",
  "modified": "2019-01-08T12:30:34Z",
  "currency": "GBP",
  "applicantId": "APP2200001",
  "propertyId": "OXF123022",
  "negotiatorId": "JAS",
  "status": "pending",
  "amount": 650,
  "frequency": "monthly",
  "related": [
    {
      // Applicant/contact
    }
  ]

POST /tenancies/offers


{
  "currency": "GBP",
  "applicantId": "APP2200001",
  "propertyId": "OXF123022",
  "negotiatorId": "JAS",
  "status": "pending",
  "amount": 650,
  "frequency": "monthly"

},

PATCH /tenancies/offers/{id}

{
  "currency": "GBP",
  "status": "pending",
  "amount": 650,
  "frequency": "monthly",
}
github-actions[bot] commented 10 months ago

Thank you for taking the time to report a bug. We prioritise bugs depending on the severity and implications, so please ensure that you have provided as much information as possible. If you haven’t already, it really helps us to investigate the bug you have reported if you provide ‘Steps to Replicate’ and any associated screenshots. Please ensure any personal information from the production database is obscured when submitting screenshots. This issue will be reviewed in our weekly refinement sessions and assigned to a specific project board. We may also update the ticket to request additional information, if required. For more information on our processes, please click here

rochellelevy commented 10 months ago

@AshDeeming this currently blocking us on some lettings work that we need to complete. when will this discussed as to when it can be worked on

HollyJoyPhillips commented 10 months ago

Hi @rochellelevy, this has been referred to our Foundations team for specification. We'll update the ticket when we are in a position to proceed.

rochellelevy commented 10 months ago

@HollyJoyPhillips can you provide me with an ETA please?

HollyJoyPhillips commented 10 months ago

Hi @rochellelevy, the Foundations team have reviewed the requirements so we will move this to be refined and a specification added. From there we will be able to advise on an ETA.

github-actions[bot] commented 10 months ago

This issue has been updated and moved to our ‘Near Term’ column (typically completed within 0 - 4 months). We have assessed the effort required and outlined a technical specification - please take the time to review this detail. When we're ready to schedule the issue, it will be assigned to the relevant board where you can continue to track its progress to completion. For more information on our processes, please click here

rochellelevy commented 10 months ago

Hi @HollyJoyPhillips please can we have an estimated date on this? Are you planning on putting this in a sprint starting soon? We cannot complete critical lettings work because of it

HollyJoyPhillips commented 10 months ago

Hi @rochellelevy, we can assign this to our next sprint beginning 02/10. Thanks.

plittlewood-rpt commented 9 months ago

@gareth-evans @rochellelevy I've been looking at this and unfortunately it's not as simple as it might seem on the surface. The reason you aren't getting offers back is because your system is configured to use 'lightweight' offers for lettings which writes them to a different part of the database. My concern at the moment is I don't want to add another endpoint that surfaces offer data as that will be very confusing for the wider developer community. I'm discussing internally some possible approaches to handling this and will update this item in due course.

rochellelevy commented 9 months ago

@plittlewood-rpt what do you mean by 'lightweight'offers?

plittlewood-rpt commented 9 months ago

Hi @rochellelevy - your build has a setting enabled that tells the system to store offers in the lettings offers table instead of the tenancy table (which is why you don't see them in the API). Ideally we'd disable this setting as it's now a legacy feature, but we'd need to discuss with Savills if there were likely to be any downstream effects of doing this. They are deemed lightweight as you do not get any access to the Tenancy screen until the offer is Accepted. when the setting is disabled, you can access the Tenancy screen whilst the offer is still in offer status which gives users the ability to setup parts of the tenancy in advance if they expect the offer to be accepted

rochellelevy commented 9 months ago

thanks @plittlewood-rpt I suppose we need to discuss this with Steph Mollins and someone on the Lettings side who were looking after project panther. Shall I leave this with you to send a mail out or do you need me to set up a call?

rochellelevy commented 8 months ago

@plittlewood-rpt we've looked at this internally and we're removing the feature where we require this. This ticket can be closed

HollyJoyPhillips commented 8 months ago

Hi @rochellelevy, thanks for letting us know.