review mode
I was missing a review view. Here's my suggestion for it:
git clone https://github.com/Popsch/tracks.git -b implement_review_view
It implements:
It's necessary for the weekly review of the actions to be done.
To use it do:
git clone https://github.com/Popsch/tracks.git -b implement_review_view
It implements:
- a review date for projects with preferences
- a view showing which projects need attention (review, stalled, blocked)
It's necessary for the weekly review of the actions to be done.
To use it do:
- bundle exec rake db:migrate
- http://localhost:3000/review
- access key is Ctrl-R
- menu entry is under 'organize'
Leave a comment
Finally got around to upgrading to master (commit bc529f7baa06750af3d0a95f051edd5279d66ce8) . Found some issues with the 'review' functionality:
1. The routes for the 'set_reviewed' functionality need to be of the form: http://devel/tracks/projects/21/set_reviewed (note the 'projects'). That seems to work if I reach the 'reviewed' button via project/edit settings link from an individual project's page. However, when I click on the pencil icon in the project list or in the review list, then the review button has a route of e.g., http://devel/tracks/21/set_reviewed. Note it's missing the '../projects/.....', and hence I get a routing error:
2. You mention a 'review_date'. Where should I find that?
3. Lastly a suggestion, can we also show the projects that are current at the bottom of the review view, rather than just the ones that are problematic?
1. The routes for the 'set_reviewed' functionality need to be of the form: http://devel/tracks/projects/21/set_reviewed (note the 'projects'). That seems to work if I reach the 'reviewed' button via project/edit settings link from an individual project's page. However, when I click on the pencil icon in the project list or in the review list, then the review button has a route of e.g., http://devel/tracks/21/set_reviewed. Note it's missing the '../projects/.....', and hence I get a routing error:
ActionController::RoutingError (No route matches "/1/set_reviewed" with {:method=>:get}):
2. You mention a 'review_date'. Where should I find that?
3. Lastly a suggestion, can we also show the projects that are current at the bottom of the review view, rather than just the ones that are problematic?
@routing problem: There's a pull request in git that fixes the routing problem. I have no clue, why the problem didn't occur in my development version.
@review_date: go to the preferences, there you can set the review interval
@suggestion: what do you mean by 'can we also show the projects that are current at the bottom of the review view'? They are shown in the review view, aren't they?
@access key: In linux, the access key is mapped to alt. So 'ALT-R' should access the review mode, however, in Firefox, you might have some other key mapped to it.
@review_date: go to the preferences, there you can set the review interval
@suggestion: what do you mean by 'can we also show the projects that are current at the bottom of the review view'? They are shown in the review view, aren't they?
@access key: In linux, the access key is mapped to alt. So 'ALT-R' should access the review mode, however, in Firefox, you might have some other key mapped to it.
@review date: got it. Wasn't obvious to me that that's the project review date, we could rename it to 'Project review interval'
@routing: o.k. Will check again when Rainier gets a break from changing diapers
@access key: ALT-Capital R works for me on Windows Firefox, will test on Linux tomorrow (no big deal either way)
@suggestion: Here's what I see:
I currently have 32 projects, 30 in progress, 2 completed (from the projects page)
On the review page I see 27 dated projects and 15 stalled projects, for a total of 42 (obviously some projects are both dated and stalled).
When I now open one of them (say 'Oktoberfest) and set it to reviewed, and then go back to the review page I see 41 projects, 26 dated and 15 stalled, in other words a project that was just reviewed and therefore current is not in the view. I suggested adding a category 'current' or 'up to date' at the bottom of the list that shows those projects.
@routing: o.k. Will check again when Rainier gets a break from changing diapers
@access key: ALT-Capital R works for me on Windows Firefox, will test on Linux tomorrow (no big deal either way)
@suggestion: Here's what I see:
I currently have 32 projects, 30 in progress, 2 completed (from the projects page)
On the review page I see 27 dated projects and 15 stalled projects, for a total of 42 (obviously some projects are both dated and stalled).
When I now open one of them (say 'Oktoberfest) and set it to reviewed, and then go back to the review page I see 41 projects, 26 dated and 15 stalled, in other words a project that was just reviewed and therefore current is not in the view. I suggested adding a category 'current' or 'up to date' at the bottom of the list that shows those projects.
I've merged all pull requests
If have a few "problems" with all of this
If have a few "problems" with all of this
- set_reviewed is now a GET in routes.rb. I'd like that to be a POST or PUT, because calling set_reviewed will change the state of the project and changes should always be done using PUT/POST. I couldn't get it working quickly, so for now I restored the GET
- does the button need to be in the project_form or do you want it to be on the project page. When I review a project, currently I need to first click "Edit this project" and then mark it reviewed. Do we need the first click?
- we need tests for this new feature (unit tests for the model changes and cucumber tests for the interaction)
It would be nice to display the button right aligned next to the 'Edit Project Settings' as it saves one click.
Is there some documentation how to write test cases and what the database looks like? It should be straightforward, however, I don't know where to start. Glancing through /test didn't help that much.
Is there some documentation how to write test cases and what the database looks like? It should be straightforward, however, I don't know where to start. Glancing through /test didn't help that much.
I thought of a couple of test cases, however, I don't know how to program them:
- Check new project needing review
- create a new project
- assert that project needs a review
- Check review button
- create a new projcet
- invoke 'review' button in gui
- assert that the project needs no review
- Check review need
- create a new project
- set the last_reviewed field of the project to last year
- assert that the project needs a review
- Check stalled
- create a new project without todos
- assert that the project is marked as stalled
- Check blocked
- create a new project
- add one todo to the project
- set the show_from field to 7 days in the future
- assert that the project is marked as blocked
You can look at some of the existing .feature files under the features directory in order to see how you might test those with cucumber.
For example, for your first test case, you might write:
You can then implement code in features/step_definitions that will do the Given, When, and Then steps in your test case. Running cucumber after adding the scenario but before doing anything to implement it will give you some boilerplate code to add to one of the files in features/step_definitions
For example, for your first test case, you might write:
Scenario: Projects require review when they are created
Given that I have not created a project
When I create a project
Then it should be marked as needing a review
You can then implement code in features/step_definitions that will do the Given, When, and Then steps in your test case. Running cucumber after adding the scenario but before doing anything to implement it will give you some boilerplate code to add to one of the files in features/step_definitions
Can you please check I'm doing this the right way?
I added a three scenarios. While they check whether the project occurs in the response page, the test doesn't check whether the project is in the right category.
git clone git://github.com/Popsch/tracks.git -b review_test
I added a three scenarios. While they check whether the project occurs in the response page, the test doesn't check whether the project is in the right category.
tests got merged https://github.com/TracksApp/tracks/pull/62