LibreHealthIO / lh-ehr

LibreHealth EHR - Free Open Source Electronic Health Records
Other
238 stars 262 forks source link

Able to add invalid email when adding pharmacy #1413

Closed Ngai-E closed 5 years ago

Ngai-E commented 5 years ago

A) Outreachy Username: elizabeth

B) Issue Title: Able to add invalid email when adding pharmacy.

C) Bug Report Date: Thursday, 28th February 2019.

D) Site Affected: Documentation Site and NHANES

E) OS/ Browser Used: Chrome on Ubuntu 16.04

F) Which Workflow Module in LHEHR: Administration => Practice Settings

G) Steps to Reproduce the Bug:

  1. Login to the LibreHealth EHR platform.
  2. Move on to the Administration menu item and select Practice from the drop down options.
  3. Click on Pharmacies and then click on Add a Pharmacy.
  4. Fill in a pharmacy Name (which is required).
  5. Fill in a wrong Email say “thisIsWrongEmail Right?”.
  6. Click on the Save button and it will be saved successfully to the database without throwing a validation error.

H) At Point of the Bug, the Expected Behavior: The expected behavior was to prompt the user to input a valid email address before clicking save.

I) Details of What Actually Happened: Typed in an invalid email address when adding a pharmacy and it was accepted.

J) Provide Relevant Screenshot and Explain the Screenshot: image Illustration 1: Select Practice from Administration

image Illustration 2: Select Pharmacies

image Illustration 3: Click on Add a Pharmacy button

image Illustration 4: Fill in invalid email as shown in this example and click save which will then save successfully

K) Estimation of The Bug Severity: Module continues with ongoing errors (Critical).

muarachmann commented 5 years ago

thanks for your report @Ngai-E we are here to help you fix this is you want

Ngai-E commented 5 years ago

thanks for your report @Ngai-E we are here to help you fix this is you want

Yes muarachmann I would love to contribute to the fixing this and any other issues if permitted. I am good at HTML/CSS, JavaScript, PHP, MySQL just to name a few and I am willing to learn any other requirements to work on LibreHealth EHR. Waiting on instructions on how to proceed thanks.

muarachmann commented 5 years ago

@Ngai-E sure. use the inspector tool to guide you on seeing where the resource file is located. If you have any issues ping me in the chats or just drop it here :)

Ngai-E commented 5 years ago

@Ngai-E sure. use the inspector tool to guide you on seeing where the resource file is located. If you have any issues ping me in the chats or just drop it here :)

sure, thanks.

Ngai-E commented 5 years ago

Hi @muarachmann I think i have a solution for this issue please. I made this change to controller.php file for add pharmacy and i think it works now but the test has only been done locally. controller.php.zip

muarachmann commented 5 years ago

@Ngai-E closing this since solved