openmrs-core icon indicating copy to clipboard operation
openmrs-core copied to clipboard

RA-552:Adding the View Logged in Users functionality to core

Open HerbertYiga opened this issue 3 years ago • 40 comments

ticket Id:https://issues.openmrs.org/browse/RA-552

Adding the View Logged in Users functionality to core

HerbertYiga avatar Mar 01 '21 19:03 HerbertYiga

Thanks @HerbertYiga feel free to check out my comment on the ticket, however i would also think this should be fixed in legacyui

sherrif10 avatar Mar 01 '21 20:03 sherrif10

thanks @sharif this exists in ui and a suggestion came in to have it under core

HerbertYiga avatar Mar 01 '21 20:03 HerbertYiga

Do you mind pointing me to that thread talking about core please thanks

sherrif10 avatar Mar 01 '21 20:03 sherrif10

its this @sherrif10 https://talk.openmrs.org/t/view-logged-in-users-is-empty/19348/4

HerbertYiga avatar Mar 01 '21 20:03 HerbertYiga

@HerbertYiga did you see the travis build failure?

dkayiwa avatar Mar 02 '21 19:03 dkayiwa

@dkayiwa yes i saw the Travis build failure, this breaks because i didn't include the HttpSession and ServletContext dependencies at core.Is there any reason why we don't implement HttpSession and ServletContext at core? cc @dkayiwa @ibacher

HerbertYiga avatar Mar 03 '21 05:03 HerbertYiga

Coverage Status

Coverage increased (+53.3%) to 63.583% when pulling 0c6e57214cd37877e1bafcc1f80a49b3b1c827c6 on HerbertYiga:RA-552 into bae850075e4436983a3b90e8f99510632001c772 on openmrs:master.

coveralls avatar Mar 04 '21 02:03 coveralls

its this @sherrif10 https://talk.openmrs.org/t/view-logged-in-users-is-empty/19348/4

Thanks @HerbertYiga for the link sorry for late response

sherrif10 avatar Mar 04 '21 19:03 sherrif10

@dkayiwa how do things look on this pr,the travis breaks only for openjdk 10

HerbertYiga avatar Mar 09 '21 14:03 HerbertYiga

hi @dkayiwa i have included logged in users for the tests

HerbertYiga avatar Mar 10 '21 11:03 HerbertYiga

@HerbertYiga did you run the web application and confirm that this is behaving as expected?

dkayiwa avatar Mar 10 '21 14:03 dkayiwa

did you run the web application and confirm that this is behaving as expected?

@dkayiwa my plan around this is to access the introduced method from reference application module so that i create a view there, could this be a right direction?

HerbertYiga avatar Mar 10 '21 20:03 HerbertYiga

my plan around this is to access the introduced method from reference application module so that i create a view there, could this be a right direction?

@dkayiwa added some comments here!!

HerbertYiga avatar Mar 14 '21 19:03 HerbertYiga

@HerbertYiga i do not dictate the right direction.

dkayiwa avatar Mar 14 '21 19:03 dkayiwa

@HerbertYiga are you still working on this?

dkayiwa avatar Mar 19 '21 09:03 dkayiwa

@HerbertYiga are you still working on this?

Am trying to create a page from which we can view the logged in users from ref app for this

HerbertYiga avatar Mar 19 '21 09:03 HerbertYiga

@HerbertYiga are you still working on this?

Am trying to create a page from which we can view the logged in users from ref app for this

i will be making a pr for the page for this soon

HerbertYiga avatar Mar 19 '21 09:03 HerbertYiga

@HerbertYiga you do not need to create a new page for this. All you need is make the existing one use these new changes. Does this make sense?

dkayiwa avatar Mar 23 '21 08:03 dkayiwa

you do not need to create a new page for this. All you need is make the existing one use these new changes. Does this make sense?

@dkayiwa the statement got me confused a bit, my approach was to create a list to display users after calling (getCurrentUsers). And this line confused me (All you need is make the existing one use these new changes),does this mean we arleady have a page that shows an existing users under ref app,i am only aware of one under legacy ui?

HerbertYiga avatar Mar 24 '21 07:03 HerbertYiga

Did you test with the legacyui?

dkayiwa avatar Mar 24 '21 08:03 dkayiwa

@HerbertYiga you do not need to create a new page for this. All you need is make the existing one use these new changes. Does this make sense?

@dkayiwa it got me confused some how,i was

Did you test with the legacyui?

@dkayiwa not really, since the same code exists at the legacy ui

HerbertYiga avatar Mar 24 '21 08:03 HerbertYiga

@dkayiwa let me go on to test with the legacy ui

HerbertYiga avatar Mar 24 '21 08:03 HerbertYiga

Did you test with the legacyui?

hi @dkayiwa , i have tested this on a running instance of openmrs under the legacy ui module,the changes i made under the legacy ui are reflected by this pr https://github.com/openmrs/openmrs-module-legacyui/pull/145 .I have also added the screen shots on the ticked Id.they are named as 1)One and 2)Two , One shows the user name when a single user is logged in while Two shows the list of logged in users whom i have tested using two browsers by logging in each on a different browser.

HerbertYiga avatar Mar 25 '21 13:03 HerbertYiga

@HerbertYiga you also need to test with the CurrentUsers class deleted from the legacyui module.

dkayiwa avatar Mar 29 '21 14:03 dkayiwa

you also need to test with the CurrentUsers class deleted from the legacyui module.

@dkayiwa ok let me do that

HerbertYiga avatar Mar 29 '21 16:03 HerbertYiga

you also need to test with the CurrentUsers class deleted from the legacyui module.

@dkayiwa dropped current users from legacy as seen here https://github.com/openmrs/openmrs-module-legacyui/pull/145, tested and all was well,i added the screen shots on the ticket ID ie

1)onDeletingCurrentUsersFromLegacy1

  1. onDeletingCurrentUsersFromLegacy2

HerbertYiga avatar Mar 31 '21 20:03 HerbertYiga

@dkayiwa the discussion on irc has been really help full, made some changes here thanks

HerbertYiga avatar May 07 '21 10:05 HerbertYiga

@HerbertYiga have you run the web application again in debug mode and confirmed that CurrentUsers.addUser() is being called?

dkayiwa avatar May 07 '21 11:05 dkayiwa

have you run the web application again in debug mode and confirmed that CurrentUsers.addUser() is being called?

picked up on this

HerbertYiga avatar May 07 '21 12:05 HerbertYiga

hi @dkayiwa tested this with a running instance of openmrs and i see now the CurrentUsers.addUser() from core is used,i have added the current screenshot to the ticket id

HerbertYiga avatar May 30 '21 21:05 HerbertYiga