camilosampedro / Aton

Open web computer laboratory administrator
http://camilosampedro.github.io/Aton
GNU General Public License v3.0
14 stars 12 forks source link

issue 12 solved by making rooms ordered by name #21

Closed ubaldop closed 8 years ago

ubaldop commented 8 years ago

Issue solved is #12

  1. Why this change is necessary? To allow a proper room sorting by name as required by the issue.
  2. How does it address the issue? By introducing a for comprehension I've filtered the optional rooms and ordered before to apply all the maps operations within the services.impl.LaboratoryServiceImpl.get(id: Long) method.
  3. What side effects does this change have? I've added also a little bit of code formatting on the affected class.

Please note that, since the Option[Room] filtering is already defined by the new for comprehension, this filtering is no more necessary.

camilosampedro commented 8 years ago

Thank you very much!

I did not think someone could sit down and try to understand and change those particular parts of code, they have a lot of things together.

I will need to test it tomorrow before merging because it is an important part of Aton. I will keep you updated. 🙋

camilosampedro commented 8 years ago

Hi @P3trur0.

Thank you for your contribution.

I just tested the change and it does not seem like sorting the rooms, I do not really know why. I studied your code and it should work.

I will merge it and look for the problem.

ubaldop commented 8 years ago

Hi @camilosampedro glad to hear that :smiley: Are you considering also to setup a set of unit tests?

camilosampedro commented 8 years ago

Yeah, actually I need to create unit test for the most important parts of Aton.

The problem is that I tried to do some under test folder, but neither activator test or sbt test recognized them. (There is a Unit Test class for a controller there).

Do you know how to make them run? Anyway I will create an issue for that 😃.

ubaldop commented 8 years ago

Hi @camilosampedro, I've introduced ScalaTest dependency.

See this pull request