OpenBankProject / OpenBankProject/OBP-API

getBranches : country not shown

Open
#662 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
1.7k
Forks
482
Avg merge
1d 12h
Merged PRs (30d)
15

Description

Using the following data on createBranch:

{'meta': {'license': {'name': 'Copyright 2017', 'id': 'copyright'}}, 'drive_up': {'hours': 'Mon: 9:00am - 4:30pm, Tue: 9:00am - 4:30pm, Wed: 9:00am - 4:30pm, Thu: 9:00am - 4:30pm, Fri: 9:00am - 5:00pm'}, 'bank_id': 'suncorp', 'address': {'line_2': '18 Jamison Street', 'line_1': '', 'line_3': '', 'country': 'AU', 'city': 'Sydney', 'state': 'NSW', 'postcode': '2000'}, 'lobby': {'hours': 'Mon: 9:00am - 4:30pm, Tue: 9:00am - 4:30pm, Wed: 9:00am - 4:30pm, Thu: 9:00am - 4:30pm, Fri: 9:00am - 5:00pm'}, 'branch_routing': {'address': '', 'scheme': ''}, 'location': {'latitude': 0, 'longitude': 0}, 'name': 'Staff Banking Sydney', 'id': '4578'}`

Does not show the country (AU) in the output of getBranches:

{
    "id":"4578",
    "name":"Staff Banking Sydney",
    "address":{
      "line_1":"",
      "line_2":"18 Jamison Street",
      "line_3":"",
      "city":"Sydney",
      "state":"NSW",
      "postcode":"2000",
      "country":""
    },
    "location":{
      "latitude":0.0,
      "longitude":0.0
    },
    "lobby":{
      "hours":"Mon: 9:00am - 4:30pm, Tue: 9:00am - 4:30pm, Wed: 9:00am - 4:30pm, Thu: 9:00am - 4:30pm, Fri: 9:00am - 5:00pm"
    },
    "drive_up":{
      "hours":"Mon: 9:00am - 4:30pm, Tue: 9:00am - 4:30pm, Wed: 9:00am - 4:30pm, Thu: 9:00am - 4:30pm, Fri: 9:00am - 5:00pm"
    },
    "meta":{
      "license":{
        "id":"copyright",
        "name":"Copyright 2017"
      }
    },
    "branch_routing":{
      "scheme":"",
      "address":""
    }
  }

Looking at the database, the field mappedbranch.mcounty (typo!) is populated (and mappedbranch.mcountrycode empty)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace the getBranches and createBranch mapping for branch address fields, then inspect how mappedbranch.mcounty and mappedbranch.mcountrycode are read. Reproduce the supplied AU branch data and verify that the output country is populated from the correct database field.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
api, backend, databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.