Week 8

Today i started by Migrating the User activation key to the login credential Object, this is as a result of the design discussion i had last week with my mentor and the reason is to abstract the activation key from being return in the User object and instead return it in the LoginCredential object. This process entails migrating the fields, methods and carrying out the mapping for the LoginCredential object. Which these i took care of. immediately i did this i noticed a failing test which is that of getUserByActivation Key this is a sure case and of course normal as the user object does not have the activation key any longer.

I added the setActivationKey method to persist the created token and hashed to form the activation Key. This came up after the refactoring of the user object by sending the activation key to the LoginCredential Object. After successfully completing the above i made a pull request and from the feedback i got just the very same day i started updating and explaining why i did what i did to my mentor i also made an error of exposing one core method which is not supposed to have been exposed to the api ie LoginCredential, I added a method getLoginCredential that returned the LoginCredential associated with a particular token And thanks to my mentor i Removed it from the service layer but left it at the DAO layer. I also had to write the test for the newly added methods that i introduced and this was a handy part of the work as the algorithm i implemented for the checking creation and checking of the token is based on the system current time stamp. So getting data set for such a test that runs using the system timestamp and has an expiry date is not and easy or in fact a possible thing. So I resulted to writing the test in the DAO that will do the testing for the methods that i added. I successful wrote these test and tested them and they all worked as expected. I therefore made a commit with these changes here https://github.com/openmrs/openmrs-core/pull/2687/commits/b1a4853393f75c5f1486b69f2520f6ebb46fb0ec .This marked the end of the week.

Also i noticed and had a hard time trying to connect with my mentor for our usual weekly conversation which usually takes place on uberconference. The reason for this was not that obvious as Usual i know and assume everything will be OK till the faithful moment when it was the time for the meeting to begin. I logged into the platform and Got this weird message from uberconference saying my browser doesn't have access to my microphone i thought it was something not that difficult to fix so in a haste i went to the setting of my browser and checked and everything was OK. I changed browser from chrome to windows edge. and i still got the same error. I googled how to set allow access for my browser to use my phone and all attempted solutions did not work. So all this while i couldn't get in contact with my mentor and finally the time for the meeting got over without me succeeding in fixing the error. Then I let it go and still not knowing what was the issue. I wasn't having a peace of mind. Then i kept reflecting on possible reasons and by Saturday. I noticed it actually was the cable of my headset that internally wasn't working so i changed headset and boom everything came back to normal.

Comments

Popular posts from this blog

Algorithm Design A Call For Concern To Software Engineers

A health wise peep into the life of a home based developer

Week Twelve