Web Stories

#1163: Edit Pages Should Show That An Audio File Is Attached To A Record

Yanhui (Brisbane)
As a user, I want to know if an audio file has been attached to a record when I'm editing that record. At the moment, the edit page will show photo thumbnails when photos are attached to a record, but shows no indication of an audio file when an audio recording is attached.

Scope:
If an audio recording is attached to a record, the edit record page should reflect it by either showing the audio player or an image representing the audio file, with a download link. Image should be a typical audio file icon.


h3. Acceptance Criteria

|Given|When|Then|
|Given an mp3 has been attached to a child record|When I am on the Edit Child Record page|Then I should see an audio player at the bottom of the record|
|Given an AMR file has been attached to a child record|When I am on the Edit Child Record page|Then I should see an audio file image and a download link at the bottom of the record|

#1160: Records Should Show Links to its Duplicate Records

h3. Narrative


As a user, I want to know if a record has been marked as a duplicate of another record. And if so, I want to be able to see the duplicate, hidden record so that I can access any information that might still be there.


h3. Acceptance Criteria

|Given|When|Then|
| GIVEN that 'DUPE RECORD' is a duplicate of 'REAL RECORD' | WHEN I navigate to 'REAL RECORD' | THEN I should see a message at the top that reads "Another record has been marked as a duplicate of this one. Click here to see the duplicate record." AND 'here' should link to DUPE RECORD" |

#1158: Flagged Records Should Display Flag Info in Summary Row

Mustafa
h3. Narrative

As a user, I want to see who flagged a record, when, and for what reason, in the record summary when I am in any of the view record or search results pages, so that I can quickly make decisions about records without clicking through.

h3. Acceptance Criteria

|Given|When|Then|
|a child record has been flagged as suspect | I am on a "view all" child records page | I should see "Flagged By {user} on {date flagged} Because {Reason flagged} in the record summary row.|
|a child record has been unflagged as suspect | The child record shows up in the search results page | I should not see the flagging details in the record summary row.|
|a child record has been flagged as suspect | I am on a "view all" child records page | I should see "Flagged By {user} on {date flagged} Because {Reason flagged} in the record summary row.|
|a child record has been unflagged as suspect | The child record shows up in the search results page | I should not see the flagging details in the record summary row.|

#1147: Upgrade Photo & Audio Features from Webrat to Capybara

So that we can eventually upgrade to Rails 3.1 and make RapidFTR the modern marvel it should be, we need to fully transition from Webrat to Capybara. This is one of a series of very similar stories to help with that process. If you have any questions, please email jorge and the Google Group.

h3. Scope:

This story covers the following features only:
* show_child_thumbnail.feature
* upload_a_childs_audio.feature
* upload_a_childs_photo.feature
* view_child_audio.feature
* view_child_record_log.feature
* edit_an_existing_photo.feature



h3. Steps:

# Move feature file from features/ to capybara_features/
# Run tests
## If the scenarios all pass, then move on to the next feature on the list and repeat
# If a test does not pass, figure out what steps need to be rewritten so that they pass. Rewrite them.
# If you find something has been duplicated in the cucumbers you are migrating, de-dupe them.
# If you have any questions, email the google group.



h3. Acceptance Criteria

|Given|When|Then|
|Given I have moved a feature from features/ to capybara_features/|When I run the tests|Then they all pass!|

#1146: Upgrade Search and Child Record Features From Webrat to Capybara

So that we can eventually upgrade to Rails 3.1 and make RapidFTR the modern marvel it should be, we need to fully transition from Webrat to Capybara. This is one of a series of very similar stories to help with that process. If you have any questions, please email jorge and the Google Group.

h3. Scope:

This story covers the following features only:
* basic_search.feature
* reunite_child_record.feature
* assign_unique_id_to_child.feature
* child_record_validations.feature
* add_caregiver_details_to_a_child_record.feature
* create_child_record.feature
* add_family_details_to_a_child_record.feature
* edit_child_record.feature
* flag_child_record.feature
* manage_children.feature


h3. Steps:

# Move feature file from features/ to capybara_features/
# Run tests
## If the scenarios all pass, then move on to the next feature on the list and repeat
# If a test does not pass, figure out what steps need to be rewritten so that they pass. Rewrite them.
# If you find something has been duplicated in the cucumbers you are migrating, de-dupe them.
# If you have any questions, email the google group.



h3. Acceptance Criteria

|Given|When|Then|
|Given I have moved a feature from features/ to capybara_features/|When I run the tests|Then they all pass!|

#1145: Upgrade API Features from Webrat To Capybara

Srini/Mark
So that we can eventually upgrade to Rails 3.1 and make RapidFTR the modern marvel it should be, we need to fully transition from Webrat to Capybara. This is one of a series of very similar stories to help with that process. If you have any questions, please email jorge and the Google Group.

h3. Scope:

This story covers the following features only:
* api_authentication.feature
* api_create_child.feature
* api_edit_child.feature
* api_retrieve_child_photo.feature
* api_retrieve_child_record.feature
* api_retrieve_child_record_ids.feature
* api_retrieve_contact_info.feature
* api_retrieve_form_sections.feature


h3. Steps:

# Move feature file from features/ to capybara_features/
# Run tests
## If the scenarios all pass, then move on to the next feature on the list and repeat
# If a test does not pass, figure out what steps need to be rewritten so that they pass. Rewrite them.
# If you find something has been duplicated in the cucumbers you are migrating, de-dupe them.
# If you have any questions, email the google group.



h3. Acceptance Criteria

|Given|When|Then|
|Given I have moved a feature from features/ to capybara_features/|When I run the tests|Then they all pass!|

#1144: Upgrade User-Related Features from Webrat To Capybara

Gui & CG
So that we can eventually upgrade to Rails 3.1 and make RapidFTR the modern marvel it should be, we need to fully transition from Webrat to Capybara. This is one of a series of very similar stories to help with that process. If you have any questions, please email jorge and the Google Group.

h3. Scope:

This story covers the following features only:
* (done) edit_user_details.feature
* (done) manage_users.feature
* password_recovery_request.feature
* user_disable.feature
* user_login.feature
* user_time_zones.feature
* create_and_view_user.feature


h3. Steps:

# Move feature file from features/ to capybara_features/
# Run tests
## If the scenarios all pass, then move on to the next feature on the list and repeat
# If a test does not pass, figure out what steps need to be rewritten so that they pass. Rewrite them.
# If you find something has been duplicated in the cucumbers you are migrating, de-dupe them.
# If you have any questions, email the google group.


h3. Acceptance Criteria

|Given|When|Then|
|Given I have moved a feature from features/ to capybara_features/|When I run the tests|Then they all pass!|

#1143: Upgrade Assorted Admin Features from Webrat to Capybara

Ganesh
So that we can eventually upgrade to Rails 3.1 and make RapidFTR the modern marvel it should be, we need to fully transition from Webrat to Capybara. This is one of a series of very similar stories to help with that process. If you have any questions, please email jorge and the Google Group.

h3. Scope:

This story covers the following features only:
* admin_access.feature
* admin_page_link.feature
* sidebar_links.feature
* webapp_authentication.feature
* editing_contact_info.feature
* home_page_link.feature


h3. Steps:

# Move feature file from features/ to capybara_features/
# Run tests
## If the scenarios all pass, then move on to the next feature on the list and repeat
# If a test does not pass, figure out what steps need to be rewritten so that they pass. Rewrite them.
# If you find something has been duplicated in the cucumbers you are migrating, de-dupe them.
# If you have any questions, email the google group.



h3. Acceptance Criteria

|Given|When|Then|
|Given I have moved a feature from features/ to capybara_features/|When I run the tests|Then they all pass!|

#1142: Upgrade Fields Features from Webrat to Capybara

John Hume
So that we can eventually upgrade to Rails 3.1 and make RapidFTR the modern marvel it should be, we need to fully transition from Webrat to Capybara. This is one of a series of very similar stories to help with that process. If you have any questions, please email jorge and the Google Group.

h3. Scope:

This story covers the following features only:
* -delete_field_from_forms_section.feature-
* -add_suggested_field_to_form_sections.feature-
* create_custom_fields.feature
* reorder_fields.feature
* disable_enable_form_fields.feature
* add_custom_field_to_form_section.feature
* edit_custom_fields.feature


h3. Steps:

# Move feature file from features/ to capybara_features/
# Run tests
## If the scenarios all pass, then move on to the next feature on the list and repeat
# If a test does not pass, figure out what steps need to be rewritten so that they pass. Rewrite them.
# If you find something has been duplicated in the cucumbers you are migrating, de-dupe them.
# If you have any questions, email the google group.



h3. Acceptance Criteria

|Given|When|Then|
|Given I have moved a feature from features/ to capybara_features/|When I run the tests|Then they all pass!|

#1126: Field "Hidden/Visible" is referred to internally as field.enabled

Ben Ihle
When we make a field hidden in the interface, we set a field called 'enabled'. (as in field.enabled = false means "Hidden" and vice versa).

To improve consistency, can we have the field renamed to "visible" please!

#1118: Advanced Search results do not display highlighted fields (or default highlighted fields)

minno
h1. Description

Expected Result: The 'view all children', search results and advanced search results page should show the first three fields from the first form as default. If an admin has edited the 'highlight fields' feature, then they should show her selected fields instead.

Actual Result: The Advanced Search does not display the highlighted fields. The child's name and registration info is displayed (registered by & last updated) but not the highlighted fields or default fields.

Scope: The view all children and search results page work as intended. This defect covers the Advanced Search results view only. It should mimic the others.

See story #653

h1. Steps to reproduce

# Login to RapidFTR
# Click "Search" on the top right of the page
# Click "Advance Search"
# Perform a search, which will return results

#748: Filter Search Results By User Level

Sadique Ali, Kaushik Ramachandran
As a user, I want my searches to return child records according to my permissions level. If I only have access to child records that I have created myself, then my searches should only return records I have permission to see.

h3. Acceptance Criteria

|Given|When|Then|
|Given the user's permission is set to "Limited" (View/Edit Their Own Records Only| When I am on the Search page | Then only records matching the search criteria and created by the logged in user should be returned|
|Given the user's permission is set to “Unlimited" (View/Edit Records Created by Everyone)| When I am on the Search page | Then all records matching the search criteria should be returned regardless of who created the records|
|Given that user Jorge has created a child named Chris1 AND user Just is able to access only his own records|When user Just pastes the url for the Chris1 child record in his browser|Then the Chris1 child record should not be shown and user Just should return to the home page|
|Given my permission is set to "Limited" (View/Edit Their Own Records Only| When I am on the Search page | Then I should not have the option to search by 'created by' on the advanced search page.|

#745: Create "Limited Access" User Level

shyam
h3. Narrative

As a system administrator, I want to assign specific users the ability to only access and edit the child records that they have created, so that volunteers can register children in the field without being able to compromise the security of children whom they may not be in direct contact with.

This story covers:
* Adding a sub-option on the "User Details" section on the Add/Edit Users Page
* Only allowing "Limited Access Users" to see child records that they have created in the child view lists.

This story DOES NOT cover:
* search functionality (handled in story #748)



h3. Acceptance Criteria

|Given|When|Then|
|I am on the Manage Users Page| I select 'New User'| On the New User page I should see a radio button option labeled "User Permission Level: " with the following options: (option one) "Unlimited" (option 2 - SET AS DEFAULT) " Limited"|
|I am on the Manage Users Page| I select 'Edit' for an existing user |I should see a radio button option labeled "User Permission Level: " with the following options: (option one) "Unlimited" (option 2) "Limited" with the previously selected option enabled|
|a user set with "Unlimited" is created| I select "View all children" | Then on the "Listing Children" page, ALL child records should be displayed regardless of who created them.|
|a user set with "Limited" is created| I select "View all children" | Then on the "Listing Children" page only the child records created by that logged in user should be displayed.|
|a user set with "Unlimited" User Permission level and User type "User" | When logged in | The "Admin" menu access is NOT available|
|a user set with "Limited" and User type "User" | When logged in | The "Admin" menu access is NOT available|

#688: Name Field Should Be A Special Field

bruce and dahlia
Because so much depends on the name field, including basic search results, we should make the name field a special field which can't be disabled, renamed, or moved within the form sections.


h3. Acceptance Criteria

|Given|When|Then|
|Given I am an admin|When I am on the Edit Fields Page of the Basic Registration Form|Then I should not see a checkbox to enable or disable the Name Field|
|Given I am an admin|When I am on the Edit Fields Page of the Basic Registration Form|Then I should not see ordering arrows next to the Name Field|
|Given I am an admin|When I am on the Edit Fields Page of the Basic Registration Form|Then I should not be able to change the name of the Name Field|

#642: Convert AMR to Mp3 (or OGG) for browser playback

*NOTE:* Some work has already begun on this story. Please pick it up and finish it. You can see the repo "here":http://www.google.com/url?sa=D&q=https://github.com/jasonneylon/RapidFTR/tree/642_Convert_amr_to_mp3 and read "this post":http://groups.google.com/group/rapidftr/msg/5b14ec08718ae73a on the google group to get a sense of what's been done.

h3. Related Stories

#333 Playback audio files without Flash plugin

#332 Playback audio files with Flash

h3. Out of Scope

* audio player
* browser capability

h3. Narrative

As a web browser user, I want to be able to listen to audio files recorded in the field without downloading so that I don't have to download and convert the default audio format.

This story is for converting .AMR files to .Mp3/OGG when they are uploaded to the server from the blackberry. At this time, the mp3s/OGGs are for playback in the web browser only. They should not be passed back down to the devices.

Currently, when a new audio file has been recorded on the blackberry and synced to the server, a link to download the audio file is displayed on the child record. For this story, the audio file should be converted to mp3 and this mp3 should be saved and made playable according to the current functionality for audio files which have been uploaded via the web browser.

* The original .amr file should be saved.
* The mp3 should be saved with the same file name as the .amr, only with the new extension.
* The mp3 should not be passed down to the blackberry.
* This should only happen when a new audio file has been created on the blackberry. (current functionality)
* The mp3 should be accessible for downloading via a link.

h3. Notes:
* There has been some discussion on the google group about this question. Jen Smith did some research and thought that ffmpeg might be the way to go.
Please read through the messages in "this thread":http://groups.google.com/group/rapidftr/browse_frm/thread/353bfc6069ce4386, (it's short!) paying particular attention to "this one":http://bit.ly/dXP5ti.
* If OGG is supported by all browsers (including IE), than we should convert to ogg in addition to mp3.

**ASSUMPTION - the estimate assumes that we leverage existing (possibly proprietary) AMR to MP3 conversion utilities and run it as a daemon process - HT/CG


h3. Acceptance Criteria

|Given|When|Then|
|Given I am a user|When an audio file i have recorded to the blackberry is synced to the server from the device|Then the file is converted to.mp3 on the web and remains available as an .amr on the blackberry.|
|Given I have synced an audio file from my blackberry|When I the amr is converted to mp3 by the server|Then it should be saved with the same name as the .amr, but with .mp3 as the file extention. downloadable.|

#628: Allow Export to CSV in Multiple Text Cases

Nick Drew and Minna Yao
So that I can better integrate RapidFTR data into my own system, I should be able to export my data in Upper Case, Title Case, or As Entered when I am exporting to CSV.

When clicking on 'export to CSV' and 'export selected records to csv' I should get a popup that asks me: "Would you like the export in UPPER CASE, Title Case, or as originally entered?

The text in the CSV should be displayed in whatever format I select.

As a
I want
So that


h3. Acceptance Criteria

|Given|When|Then|

#611: Move field from one form section to another

h3. NOTE:
The functionality of this story (moving a field to another form section) has been completed. However, it was not implemented in the way that is described below. If you pick up this story, you'll be taking the existing functionality and creating a more obvious way of accessing it. Read on:


As an administrator, I want to easily move a field from one form section to another, so that I can better manage how information is collected.

p<>(((. *Example of Problem*: At a training session we were asked to move the fields for parents name from a family characteristics form section to a basic registration form section because that info was vital for tracing purposes. To do so we had to disable the fields on the original form section, and create new fields with different names on the target form section.



*Move Link:*
* On the Edit Form Section Page there should be a 'Move Field' column to the right of the 'Ordering' column and to the left of 'Delete' and 'Edit'
** For each field, there should be a button in that column shaped like an arrow pointing to the right (-->)
** When I hover on the button, a notice should appear that says 'move this field to a different form section.'
** When I click on the button, a drop down should appear with the names of all form sections in the system.

*Drop Down:*
* The form section names should be displayed in the same way order that the form sections appear in the system.
** IF a form section is flagged as 'not editable' it should not appear in the drop down.
** The name of the current form section should not appear in the drop down.
** The first item in the drop down should be 'cancel'
** IF I click cancel, then I should return to the edit form section page.
* IF I click on the name of a form section, I should get a warning that says "The field will be moved to the Form Section." with 'ok' and 'cancel' buttons.
** IF I click 'cancel' then I should be returned to the Edit Form Section page.
** IF I click 'ok' then I should be returned to the 'edit form section page'
*** AND the field should no longer appear on the original Form Section.
*** AND the order of the remaining fields should reflect the change. (eg: If field 4 is moved to a new form section, then field 5 should now become field 4.
*** AND the field should now appear as the bottom field of the target Form Section.
**** IF the field was enabled on the original form section THEN it should be enabled on the target Form Section. AND a flash message should appear that says "The field has been moved to the Form Section."
**** IF the field was disabled on the original form section THEN it should be disabled on the target Form Section. AND a flash message should appear that says "The field has been moved to the Form Section. Go there to enable the field."

*Data:*
* All data that had been previously entered against the field should be preserved.

*QA Notes:*
Tested on 28/07/2011
Moving this story back to "Ready for Dev" , there is no "Move Link" present.

#581: Import & Export form sections and Field Configuration

As an Admin, I want to be able to export the form sections and fields configuration from one instance of RapidFTR and import it into another, so that I can:

** save it and re-import it if I mess up the form setup
** get a quick start on a new instance with the same config I used on a previous instance
** share the same form configuration with several RapidFTR instances that might need to share their data eventually.


Added functionality includes:
* creating an 'Export Current Form Configuration' link on the admin page
* creating an 'Import Form Configuration' link on the admin page
* exporting the current fields and form sections into a 'csv' that follows the format on "form_section_setup":https://github.com/jorgej/RapidFTR/blob/master/lib/rapid_ftr/form_section_setup.rb
** If the developer finds that a different format works better than a csv, they should consult the google group and then proceed.
* importing fields and form sections from a csv
* Running a formsection.create using the imported form sections

*EXPORT:*
|*Given*|*When*|*Then*|
|Given that I am an Admin|When I click on the Admin page|Then I should see a link that says Export Current Form Configuration|
|Given that I am an Admin|When I click on the Admin page|Then I should see a link that says Import Current Form Configuration|
|Given I am on the Admin page|I have clicked Export Current Form Configuration|Then a csv should download to my computer with the current form sections and field setup AND the file should be named with the [date]_RapidFTR_form_setup|
|Given I have clicked Export Current Form Configuration|the file is downloaded|the file should include the names and options of all the form sections and fields, including deprecated form sections and fields|
|Given I have clicked Export Current Form Configuration|the file is downloaded|the current order of sections and fields should be maintained|

*IMPORT:*
|*Given*|*When*|*Then*|
|Given I am an Admin|I have clicked Import Form Configuration|I should see a dialog that says "CAUTION: All Child Information May Be Deleted. Press Cancel to Go Back|
|Given I have seen the warning dialog|I click Cancel|I should go back to the Admin Page|
|Given I have seen the warning dialog|I click OK|I should be prompted to upload a file from my computer|
|Given I have selected a file|the file is not properly formatted|I should be shown a warning that says "The file you have selected is not properly formatted. Please try again."|
|Given I have selected a file|the file is properly formatted|I should be shown a warning that says "Last chance! Click OK to replace current forms. Any child data in the system may be lost."|
|Given I have seen the warning dialog|I click Cancel|I should go back to the Admin Page|
|Given I have seen the warning dialog|I click OK|The current field and form section definitions should be replaced by the new definitions in this file|
|Given I have exported the form configuration from the system|When I click "Import Form Configuration|I should be able to import the same file without making changes to it.|

#473: Add multiple audio files to a child record

Yekkanti Kishore
*NOTE: Implementation will be tightly related to implementation of multiple photo attachments: #469*

h3. Narrative

As a user, I want to be able to add multiple audio files to a child record. This way, in addition to taking a primary interview of a child, I can document other related information such as the voice of the child, or the voice of a parent to play back to the child. Currently, the system only allows for one audio file to be attached to a record.

h3. Edit Child Page

* On the Edit Child page, add a button for 'add new recording' (this should replace the 'choose file' button).
** When an audio recording is added to a record which has no recordings attached, that first recording should be the primary one.
** Next to each audio file attached to a child record, add a button that says 'change recording'
*** When this button is clicked, the user will be able to select a new recording, following the same functionality that is currently in place.
* When an audio file is already attached to the record, and I choose 'add new recording' then I should follow the same work flow, but the new audio file should appear beneath the one that was already there.
* Adding or switching audio files should be logged in the child history log, following current functionality.

h3. View Child Record Page

* The primary audio recording should be the default audio recording. So where an audio player is displayed (if the audio file is mp3 and the browser is html5), the primary recording should be the one that gets played, following current functionality. On browsers where only a download link is displayed, the primary audio file should be linked first.
* If more than one audio file is attached to a record, links to the other audio recordings should be displayed below the player.
* There should be download links for all audio files, regardless of the browser or file format.



h3. Acceptance Criteria
|GIVEN|WHEN|THEN|
|Given I am a user or admin|When I am on the Edit Child Page|Then I should see a button for 'add new recording' where the 'audio field' is displayed|
|Given I am on the Edit Child Page|When I click 'Add new recording'|Then I should be prompted to find and upload an audio file|
|Given I have added an audio file|When the audio file is the only audio file attached to the record|Then it should be designated as the primary audio file|
|Given I am on the Edit Child Page|When there is an audio file attached|Then I should see a button next to the audio file that says 'change recording'|
|Given I am on the Edit Child Page|When I click the 'change recording' button|Then I should be prompted to find and upload a new audio file, and the new audio file should replace the audio file that was previously attached.|
|Given there is already an audio file attached to the child record|When I click 'add new recording'|Then I should be prompted to find and upload an audio file and the new audio file should appear beneath the one that was previously attached.|
|Given I am on the View Child Record Page of a record with .mp3 audio attached|When I am using an html5 compatible browser|Then I should see an audio player, and it should be set to play the primary audio file|
|Given I am on the View Child Record Page of a record with more than one .mp3 audio attached|When I am using an html5 compatible browser|Then beneath the audio player, I should see links to play the secondary audio files|
|Given I am on the View Child Record Page of a record|When audio is attached|Then I should see download links for all attached audio files|
|Given I am on the edit child page|When I have added a new audio file|Then this action should be logged in the Child History page, following current functionality.| comma separated free form text; at edit of child; but not gallery

#449: Create Web User History Log

Jaco
h3. Narrative

As an Admin
I want to be able to view a user's mobile transactions history
So that I can disable users known to have misused data, compromised devices, or other problems as early as possible.

h3. Note

An "Activity Log" database will need to be created to record specific user activity including the activity time stamp; displayed in descending order.

Note from Tim Cochran: Initial work on creating activity log, events for child create, child delete, child update and user login is on this repo https://github.com/tcochran/RapidFTR/commit/9ecc67b4c5034435f3f6d6c9a22e82b9e9c43902

The timestamp should be logged whenever a user:
* Logs In:
** IP Address and User Name
* Create Child Record
* Updates Child Record

h3. Acceptance Criteria
Acceptance Criteria
| *Given* | *When* | *Then* |
| I am an Admin on the User Details page. | I scroll past the User Details and Device Information sections. | I should see a section called "User History". |
| A User has made two transactions through the Web App. | The "User History" section on the User Details page is viewed. | There are two transactions listed in order by timestamp in the User History. All transactions have the following information: timestamp, description of transaction, and IP Address. |
| A User has made twelve transactions. | The User Details page is viewed. | The ten most recent transactions are listed and a link called “Full User History” appears below the list. |
| A User has made twelve transactions. | The "Full User History" link has been clicked. | A page opens with all twelve transactions listed, in descending chronological order (Latest transaction listed first). |
| A User has logged into the Web App. | The "User History" section is viewed. | The login by the user has been logged in this format: {timestamp} {username} logged in from the web. IP Address: {ip address}. |
| A User has created a child record. | The "User History" section is viewed. | The creation of the child record has been logged, and displayed in this format: {timestamp} {username} created this child record: {uniqueID}. |
| The creation of a child record has been logged. | The "User History" section is viewed. | The child’s UniqueID in the log links to the child view page for that child record. |
| A User has updated a child record. | The "User History" section is viewed. | The update of the child record has been logged, and displayed in this format: {timestamp} {username} updated this child record: {uniqueID}. |
| The update of a child record has been logged. | The "User History" section is viewed. | The child’s UniqueID in the log links to the history page of the child record. |

#436: Saving the form order leaves the page in a strange state

h3. Note: Please try to recreate this defect in IE 7 before picking it up.

you can look at a screenshot "here":https://minglehosting.thoughtworks.com/sip/attachments/f18ed4d101f60834b6a99d55b1a8373f/3631/Screen_shot_2010-11-16_at_14.24.35.png:

-------------------

Goto http://dev.rapidftr.com:3000/formsections

change the order of a form

click on Save order.

The page ends up without having any form list (Please refer to the attachment) unless I click on the Back link and start all over again

Expected: The forms in the new order should be displayed.


!Screen_shot_2010-11-16_at_14.24.35.png!

Blackberry Stories

#1157: Create BlackBerry User History Log

James Grate
%{color:red}depends on #414%

%{color:red}similar to web app story #449%

h3. Narrative

As an Admin
I want to be able to view a user's web transaction history
So that I can disable users known to have misused data, compromised devices, or other problems as early as possible.

h3. Notes

An "Activity Log" database will need to be created to record specific user activity including the activity time stamp; displayed in descending order.

Note from Tim Cochran: Initial work on creating activity log, events for child create, child delete, child update and user login is on this repo https://github.com/tcochran/RapidFTR/commit/9ecc67b4c5034435f3f6d6c9a22e82b9e9c43902

The timestamp should be logged whenever a user:
* Logs In:
** IMEI, Phone Number, and User Name [NOTE: This is already logged elsewhere]
* Create Child Record
* Updates Child Record
* Synchronizes
** Successful attempts to synchronize
** Unsuccessful attempts to synchronize

h3. Acceptance Criteria
| *Given* | *When* | *Then* |
| I am an Admin on the User Details page. | I scroll past the User Details and Device Information sections. | I should see a section called "User History". |
| A User has and two transactions from their mobile app. | The "User History" section on the User Details page is viewed. | There are four transactions listed in order by timestamp in the User History. All transactions have the following information: timestamp and description of transaction, and an IMEI number. |
| A User has made twelve transactions. | The User Details page is viewed. | The ten most recent transactions are listed and a link called “Full User History” appears below the list. |
| A User has made twelve transactions. | The "Full User History" link has been clicked. | A page opens with all twelve transactions listed, in descending chronological order (Latest transaction listed first). |
| A User has logged into the BlackBerry App. | The "User History" section is viewed. | The login has been logged in this format: {timestamp} {username} logged in from a mobile device. IMEI Address: {IMEI}. |
| A User has created a child record. | The "User History" section is viewed. | The creation of the child record has been logged, and displayed in this format: {timestamp} {username} created this child record: {uniqueID}. |
| The creation of a child record has been logged. | The "User History" section is viewed. | The child’s UniqueID in the log links to the child view page for that child record. |
| A User has updated a child record. | The "User History" section is viewed. | The update of the child record has been logged, and displayed in this format: {timestamp} {username} updated this child record: {uniqueID}. |
| The update of a child record has been logged. | The "User History" section is viewed. | The child’s UniqueID in the log links to the history page of the child record. |
| A User has synchronized their mobile device successfully. | The "User History" section is viewed. | The successful sync has been logged, and displayed in this format: {timestamp} {username} Successfully synchronized this device: {IMEI}. |
| A User has synchronized their mobile device unsuccessfully. | The "User History" section is viewed. | The unsuccessful sync has been logged, and displayed in this format: {timestamp} {username} Failed to properly synchronize this device: {IMEI}. |

#751: Add Photo to Child Details on Blackberry

Arther
h3. Add Photo to Child Details screen on Blackberry

* I want to add additional photos to the child details so there is more possibility of the child getting identified.

h3. Context

With the new functionality to add multiple photos to the Child Details, there is more possibility of the child being identified. The field worker will be able to add/edit photos of birthmarks and other identifiers.

h3. Value

This story allows the filed worker to add more photos to the Child Details to increase possibility of identification.


h3. Scope

*Note*
Entry Points to Add Photo -
* The Child Details screen
* Context Menu on the Photo Gallery

# ‘Add Photo’ option in context menu of Child Details screen
# Launch BB camera app to take a photo
# Once picture captured, Edit Photo screen is opened

h3. Notes

The "Edit Photo" screen is being dealt with in story #737

h3. Acceptance Criteria

|Given|When|Then|
|I am on the Child Details screen|I bring up the Context Menu|the Add Photo option appears|
|I am on the Photo Gallery page|I bring up the Context Menu|the Add Photo option appears|
|I am on the Child Details screen|I click on the Add Photo option on the context menu|the BB camera app launches|
|the BB camera app is launched|I take a photo|the Edit Photo screen opens|

#737: Edit photo on a Blackberry device - add/edit label and set as primary photo

h3. As a Field Worker

* I want to edit the label of a photo to add suitable information so that I can aid accurate data collection
* I want to assign the most appropriate photo as the primary photo so that the child is identified as soon as possible

h3. Context

With the new functionality to add multiple photos to the Child Details, there is more possibility of the child being identified. The field worker will be able to add photos of birthmarks and other identifiers.

h3. Value

This story enables the field worker to aid more accurate data collection. They will be able to add information - i.e - label each of the photos. Also, they should also be able to set a particular photo as the primary photo which appears explicitly on the Child Details screen.

h3. Scope

*NOTE* : Entry points into the 'Edit Photo' screen:
* When the user wants to add a photo and the picture has just been taken with the BB camera. (story #751)
* When the 'Edit Photo' option is selected on the context menu of the 'Photo Gallery' screen. (story #733)


# Edit Photo screen.
# Context menu for Edit Photo screen as per attached workflow - Back, Save, Delete
# Text box for label to be edited.
# Back will take user back to either launching camera or the photo gallery based on the entry point.
# Save will save the changes made and open the Child Details screen.
# Delete starts delete workflow ( Refer story #735).
# Radio button on Edit Photo screen to set as primary photo.
# When changes are made on Edit Photo screen (to the label or set as primary option) and user attempts to navigate away, dialog box launched to save changes made.

h3. Notes

This story should be done before doing stories #735, #751, and #733

h3. Acceptance Criteria

|Given|When|Then|
|the user wants to Add a Photo| a photo has just been taken using the BB camera|the Edit Photo screen opens displaying the photo taken with an editable text box appearing below the photo and a 'Set as Primary Photo' radio button beneath that text box|
|the Edit Photo screen is open|the context menu is opened| Save and Delete options appear as per attachment|
|I have the Edit Photo screen open|I type a label in the text box | the user is able to see what they have typed|
|I have the Edit Photo screen open and the particular photo is not the primary photo|I click on the radio button to set as primary | the the radio button is enabled|
|I have just taken a photo and/or edited the label and/or select/deselected the "Set as Primary Photo" radio button| When I select Save from the context menu| the confirmation dialog box appears|
|the save confirmation dialog box is displayed|I click on Save|the photo, label and "Set as Primary Photo" selection is saved for the particular photo|
|the save confirmation dialog box is displayed|I click on Cancel|none of the changes are saved, the dialog box disappears and user is taken back to the Edit Photo page|
|I am on the Edit Photo screen and have not made any changes|I click on Back button|I am taken back to the previous screen - i.e - either the camera is launched or the photo gallery is opened (depends on the entry point)|
|I am on the Edit Photo screen and I've edited the photo (edit label/"Set as Primary Photo"|I click on "Back" button |the "Save" confirmation dialog box appears prompting me to save changes|
|I am on the Edit Photo screen|I click on the "Delete" option |the "Delete" confirmation dialog box appears prompting me to save changes (Delete functionality will be covered in #735)|

#735: Delete a Photo from Child Details for Blackberry device

h3. Delete a Photo from Child Details for Blackberry device

* As a Field Worker I want to delete a photo that does not serve the purpose

h3. Context

With the new functionality to add multiple photos to the Child Details, there is more possibility of the child being identified. The field worker will be able to add/edit photos of birthmarks and other identifiers.

h3. Value

* When the Field Worker has just taken a photo and wants to delete it to take a better one
* The Field Worker is reviewing the Photo Gallery and wants to delete a photo that is not particularly clear/good to make space for better photos.

h3. Scope

*Note* Entry Points to Delete -
# Context Menu on Photo Gallery
# Context Menu on Edit Photo screen


* Delete launches the Delete Confirmation dialog box as shown in the attachments.
* Clicking on Delete in the Confirmation dialog box will launch either of these actions based on where the user chose the Delete option:

h3. Note

I'd recommend to play this story after #737

h3. Acceptance Criteria

* Delete from the Context Menu on Photo Gallery - takes user Back to Photo Gallery with the deleted picture removed from the gallery.
|Given|When|Then|
|I have just taken a photo and I am on the Edit Photo screen|I click on Delete on the Context Menu|the Delete confirmation dialog box is launched with option to Delete and Cancel|
|the delete confirmation dialog box is displayed|I click on Delete|Photo is deleted and the camera is re-launched|
|the delete confirmation dialog box is displayed|I click on Cancel|the confirmation dialog box closes and user remains on the Edit Photo page|


* Delete from the Context Menu on Edit Photo screen - Confirming Delete launches the camera again.
|Given|When|Then|
|I am on the Photo Gallery screen|I highlight over a photo and I click on Delete from the Context Menu|the Delete confirmation dialog box is launched with option to Delete and Cancel|
|the delete confirmation dialog box is displayed|I click on Delete| the dialog box closes and user is remains on the Photo Gallery page Photo where the deleted photo is removed|
|the delete confirmation dialog box is displayed|I click on Cancel|the confirmation dialog box closes and user remains on the Photo Gallery page|

#733: View and edit Photo Gallery on Blackberry device

Arther, Sowmya
h3. View and edit Photo Gallery on Blackberry device

* As a Field Worker I want to view and edit all pictures associated with a child

h3. Context

With the new functionality to add multiple photos to the Child Details, there is more possibility of the child being identified. The field worker will be able to add/edit photos of birthmarks and other identifiers.

h3. Value

This will enable the user to view and scroll through the photo gallery, as well as edit/delete highlighted photos.

h3. Scope

# 'View Photo Gallery’ option on the context menu instead of the ‘View Child Photo’ option
# Photo Gallery screen with all pics of particular child, primary picture appears first
# User can scroll through photo gallery
# Context Menu screen for the Photo Gallery screen as per workflow
# Set as Primary launches Confirmation dialog box. Yes will refresh gallery for selected photo to appear first.

NOT COMPLETE

h3. Acceptance Criteria

|Given|When|Then|
|Given I am on the "Child Details" page | When I bring up the context menu | Then I should see the option to "View Photo Gallery"|
|Given I am on the "Child Details" page | When I bring up the context menu | Then I should NOT see the option to "View Child Photo" option|
|Given I am on the "Child Details" page | When I select "View Photo Gallery" option from the context menu | Then I should be navigated to the "Photo Gallery" page And I should be able to scroll through all the photos associated to the child with the primary photo appearing first on the list|
|Given user is on the "Photo Gallery" page | When the user selects the "Back" button | Then they should be taken back to the Child Details page associated to the child|
|Given user is on the "Photo Gallery" page | When I bring up the context menu | Then I should see the following options: "Add Photo", "Set as Primary", "Edit Photo", "Delete", "Child Details"|
|Given user is on the "Photo Gallery" page | When the user highlights the first photo on the list (primary photo) | Then "Set as Primary" option is not an option in the Context menu|
|Given user is on the "Photo Gallery" page | When the user highlights a photo and selects "Set as Primary"| then the "Set as Primary" dialog box is displayed with the options "Set as primary?" and "Cancel"|
|Given the "Set as Primary" dialog box is displayed | When the user selects "Set as Primary?"| Then the dialog box disappears and the user is returned to the Photo Gallery page with the selected photo appearing first on the list|
|Given the "Set as Primary" dialog box is displayed | When the user selects "Cancel"| Then the dialog box disappears and the user is returned to the Photo Gallery page with nothing changed|
|Given user is on the "Photo Gallery" page | When the user selects a photo | Then they should be taken to the "Edit Photo" page - follow Edit Photo workflow (story #737)|
|Given user is on the "Photo Gallery" page | When the user highlights a photo and selects "Edit Photo"| Then they should be taken to the "Edit Photo" page - follow Edit Photo workflow (story #737)|
|Given user is on the "Photo Gallery" page | When the user selects "Add Photo"| Then the camera is launched - follow the "add photo" workflow (story #751)|
|Given user is on the "Photo Gallery" page | When the user selects "Delete Photo"| Then follow the "delete photo" workflow (story #735)|

#685: Show Specific Errors When Sync Fails

h3. Narrative

As a user, when my attempt to sync records ends in failure, I want specific reasons returned to me so that I can act on them.

* When sync fails, the device currently reports "Errors have occurred. Do you want to Retry?" yes/no
* Instead, the message should include the specific error. (Right now it is being logged in the 'Sync Errors' screen.
** The new message should read: Sync Failed. These errors occurred: [error message], [error message]. Do you want to retry?'
** Note: if it is possible to reference the specific child, form section and field contributing the error, that would be best.


h3. Acceptance Criteria

|Given|When|Then|
|Given I am synchronizing a record or group of records|When sync fails|Then I should see the following message: "Sync Failed. These errors occurred: [error message], [error message]. Do you want to retry?' with the options yes and no|

#684: Spike: Compile List Of All Error Messages So They Can Be Rewritten

h3. Narrative

As a user, I want to see clearer error messages so that I can act on them.

For this story, we need a list of error messages and screen dialogs currently shown by the BlackBerry application, so that we can assess how clear they are and rewrite them if necessary. It's a good story to pick up if you're new to the code base, as it will get you to peek through the whole thing.

* Please write a list of all the messages you find in the BlackBerry code.
* Please write a list of all the messages you find that are passed down from the API and reported by the BlackBerry.

The list should include the actual error message, the context in which it is displayed (as a result of what event? on what screen?) and where in the code it appears.

Example:
"other process [ "+ process.name()+ " ] is Still Runing .
Do you want to Stop it?"

This message occurs when a user attempts to sync while another sync is already running. (Example: if you click 'sync individual record' then go to sync all records before it finishes)
It appears here: /RapidFTR-Blackberry/src/com/rapidftr/screens/SyncScreen.java


h3. Acceptance Criteria

|Given|When|Then| DUPLICATE ?? Look at story number #23

#683: Provide More Detailed Sync Information

h3. Narrative

As a user, I want to get more detailed sync reports, so I can keep track of when the last time I sync'd was, how many records synced, what errors may have occurred. Currently, the last sync information option only provides a date.

* When I click 'Last Sync Info' from the context menu on the home page.
** If the last sync was successful, I should see the following message: "Your last successful sync was on [date] at [time]. You added [number] new or updated records. You downloaded [number] new or updated records from the system. It has been [number] days since your last sync."
** If the last sync was unsuccessful, I should see the following message: "Your last sync failed. Your sync attempt on [date] at [time] had the following errors: [list error messages]. Please try to sync again. It has been [number] days since your last successful sync. If you cannot sync, please contact an admin for help."



h3. Acceptance Criteria

|Given|When|Then|
|Given I have clicked 'Last Sync Info'|When my last sync was successful|Then I should see the following message: "Your last successful sync was on [date] at [time]. You added [number] new or updated records. You downloaded [number] new or updated records from the system. It has been [number] days since your last sync.|
|Given I have clicked 'Last Sync Info'|When my last sync was unsuccessful|Then I should see the following message: ""Your last sync failed. Your sync attempt on [date] at [time] had the following errors: [list error messages]. Please try to sync again. It has been [number] days since your last successful sync. If you cannot sync, please contact an admin for help."| Assuming the errors need to be shown only for the forms and not for any other entities. 1. How do we want to display the errors. Is it like a dailog box or some error text on top of the form? Dialog box would not be feasible if the number of erros are high

#657: Delete All Data When Kill Signal is Received

NOTE: Code for the server side part of this story (already completed) is "here":https://github.com/tcochran/RapidFTR

In order to ensure the security of child data, the BlackBerry should trigger the 'clean device" command when a kill signal is received from the server.


When an admin blacklists an IMEI, that IMEI is recorded on a list of blacklisted IMEI numbers which the server checks upon login and requests from the device. If a blacklisted IMEI attempts to log in or to make a request of the server, the server responds with a 401 unauthorized response with the IMEI in the body of the response. (This could change depending on what is easiest for the blackberry.).

* When a device receives the kill signal, it should check the IMEI provided against the IMEI in the kill signal.
** If the IMEIs match:
*** do not allow a normal login - we want to disable the application so that the user is not allowed to make any kind of transaction through the mobile app
*** the blackberry should trigger 'clean device' and delete all rapidftr data.
*** The user should not receive any prompt or warning.
*** the application should not be able to access the server through the blacklisted device

** If the IMEIs do not match, the user should be logged out but the data should not be deleted.


h3. Acceptance Criteria

|Given|When|Then|
|The device is associated to a blacklisted IMEI number|a user logs in with a valid username/password|The following occurs:
* the user is not able to make any transactions
* delete all data of the application
* the application should not be able to access the server anymore|
|The device was blacklisted, but is not anymore|a user logs in with a valid username/password|The user is able to successfully make transactions, and sync device to receive current data| This might not be completely feasible to display entire help text on the mobile screen. If the help text is very big then the user expereince of a mobile user would be really bad. Can we trim the help text and display upto some specfied number of characters? Currently input fields are created and rendered on the sepereate screen classes. This will involve some effort to include the same condition of displaying the help text in the corresponding screens. Abstracting the input fields creation to single place would help a lot so that the display of help text can be done at one place. Estimate includes the refactoring of existing code such that all the input fields and there corresponding help texts are rendered from a single place

#646: only send resize request if photo has changed

connected to #647 (ping jorge & the google group with questions)

So that the server is not constantly sending thumbnail versions of images to the BlackBerry devices, the device should only send a resize request if the photo has actually changed.

It should send a resize request when a photo is taken for the first time.
It should send a resize request when a photo is taken that replaces the first photo
When a resize request has been fulfilled and a resized photo has been added to the record, it should not send a resize request again.

#645: Preserve sorted state of children and selected child in list

Balaji, Karthik, Suhas
h3. %{color:red}Defect%: May 10, 2011

* Clicking the BB "Back" button then returning to the "All Children" listed previously sorted by "Recently Added" resorts the list by "Name".
* Selecting "Go Home" then returning to the "All Children" listed previously sorted by "Recently Added" remains in the same sorted stated. (Does not meet Acceptance Criteria)

* "Sort by Recently Updated" is currently not sorting the list correctly. But this issue will be dealt with in another story.

* Pushing back to "Ready for Dev

h3. Narrative


As a user, I want the sorted stated of list of children and the selected child to be remembered across child record views So that the software is more usable

h3. Acceptance Criteria


|_.*Given*|_.*When*|_.*Then*|
|The list is sorted according to some criteria | The user returns to the list after viewing a particular child's record | The list should remain in the same sorted state |
|The list is sorted according to some criteria | The user returns goes back to the main screen | The list should be sorted by name when viewed the next time|
|The user selects particular child's record for viewing | The user returns to the list screen | The record of the child selected should be highlighted | Assuming that if we cancel the sync we need not roll back the records which are succesfully synced. If the cancel is clicked in the middle of synching a record, that record is only rollbacked to the original state and all the previous records which have synced successfully will not be rollbacked. Need to spike a bit and come up with a solution where the current record under sync is rollbacked if cancel is clicked and all the succesfully synced records should not be rolledback

#636: Sync Doesn't Cancel

raj
Sync doesn't cancel when you try to cancel a sync. It shows that the sync is still active. In order to cancel the sync, you have to go to 'synchronize' from the main menu. When you do that it says 'other process [ Child Sync ] is Still Runing. Do you want to Stop it?.'

This most frequently happens when choosing 'Sync Individual Record' from child record view.



This story is to:

* allow the user to cancel the sync
* try to isolate why sync hangs when trying to 'sync individual record'
* change 'sync is still runing' error message to "Attempting to sync. Press OK to stop the sync process."




h3. Acceptance Criteria

|Given|When|Then| Remove tabs and put list on right hand side; assume UI widget to leverage

#634: Form Help Text & Description Should Be Available on Blackberry

Chris B
Right now, the only information that is visible on a form is whatever is included in the field names. Because it’s very likely that forms will need detailed help text included with them, there should be an option on the context menu of each form to show the form description, help text, and field help texts.

* When registering or viewing a child, there should be an option on the context menu that says "Show Form Description & Help Text"


As a
I want
So that


h3. Acceptance Criteria

|Given|When|Then| Current tabbed view looks fine. Do we have any other ideas to represent this data? We can remove the form sections which are empty from the tabs during the view of the child. During the "Edit Child" we can show all the forms as the user can add infromation in any form. 1. Don’t render the form sections which don’t have any data in them during the "View Child"

#608: Group multiple field changes from one update together in change log view

As a user, I want to see all the fields that were changed at once presented as a group so that it's easier to see what changes were made to a child record.

Date and username should be presented once per change. Individual field changes should be displayed under the username and date.

h3. Acceptance Criteria

|Given|When|Then|

#601: Device tries to create the same record twice, causing Conflict error on server

From the logs on uganda.rapidftr.com, it appears that the device sometimes creates a child successfully but then tries to create it again, leading to a RestClient::Conflict in the logs. This then renders the 500.html page, which probably results in an "unexpected content type text/html" error on the device.

See the attached excerpt from the log for an example.

Based on the unique_id of the child and the IMEI tracking, the device used must have been IMEI *351846.03.342704.9*. I'll try to get a log from that device.


--------> see comment

#599: User is taken to main menu w/o any confirmation

h3. %{color:red}Question: What should be the result of the following Action?%

# Click on register a child.
# DONT EDIT ANYTHING
# Click on menu button of BB.

NOTE:
# The confirmation pop up is displayed asking if you want to save your changes even when no changes have been made
# What if the user tries to take a pic and decides not to? (This scenario should also be tested once fix has been implemented)


h2. Prerequisite

# Admin/User logs into BB app.

h2. Actions

# Click on register a child.
# Enter some details.
# Click on menu button of BB.
# Select main menu from the list.

h2. Actions

# Click on view all child.
# Select any child.
# Click on menu button of BB.
# Select Edit child details from the list.
# Change some details.
# Click on menu button of BB.
# Select main menu from the list.

h2. Actual Result

# It takes you to main menu page.

h2. Expected Result

# It should ask for a confirmation message if user wants to Save/Discard/Cancel.

#536: Unsupported content-type:text/html error

h2. Prerequisite

# User logs into BB app.

h2. Actions

# Enter some random data like '£' , ''while registering a child.
# Try to sync that child.
# Throws an failure error.
# Correct the data.
# Try sync again.

h2. Actual Result

# Still throws an error "Unsupported content-type:text/html error "


h2. Expected Result

# Should get synchronized with no failure after changing the data to correct one.

#413: Store binary files on the encrypted storage

Tom/Jason - AUS
We should change this story again, since apparently you can store encrypted data from the app (see comments).

h3. Narrative

As an aid worker I want the binary files (sound and image) to be stored on the encrypted storage on the device so that they can be kept secure at all times

h3. Acceptance Criteria

|Given|When|Then|
|Encryption is turned off|I start the app|I should be told I can not store Images or Sound and that I should turn on Encryption for both internal and external memory|
|Encryption is turned off|I start the app|I can not proceed|

h3. Assumption

App can detect encryption enabled.

#313: No alert message shown to the user when there is no record to sync with the server

Karthikeyan Thangavel
h4. Expected Result:

When a user syncs their app but all the records are already up to date, the the user should be notified "Your Records Are Already Up To Date"

h4. Actual result:

There is no alert message shown to the user in such scenario and on clicking on 'Sync All' once again the user is directed to the screen where he/she can see the progress bar notifying 'Sync complete'

#190: Play Sound file that is part of a child record

Priya & Shobna
As a field worker I would like to be able to play back a recorded sound file so that I can transcribe the details into the field on the form.

*NOTE*:
** Companion blackberry stories are #189, #191
** Companion API stories are: #187, #188


h3. ACCEPTANCE CRITERIA

__show play button__

** *Given*: that a user is viewing / editing a child record that contains a sound file
** *When*: the user views the record
** *Then*: they should see a play button (black triangle pointing right)
** *And*: a stop button (black square) (disabled)

---

__click play button__

** *Given*: that a user is viewing / editing a child record that contains a sound file
** *When*: the user clicks on the play button
** *Then*: the application should playback the attached sound file
** *And*: the stop button should be enabled
** *And*: the play button should be disabled
** *And*: the user should still be able to continue editing / viewing the child record

---

__click stop button__

** *Given*: that the user is viewing / editing a child record
** *And*: listening to the attached sound file
** *When*: they click on the stop button
** *Then*: the playback of the file should stop
** *And*: and the play button should be enabled
** *And*: the stop button should be disabled Admin can already make change (not in estimate)

Deployment Stories

#718: chef-repo CI build fix for Ubuntu Maverick and Natty: "/etc/init.d/couchdb restart returned 1"

The automated deployment builds for Ubuntu 10.10 Maverick and Ubuntu 11.04 Natty fail as seen here: http://ci.rapidftr.com:8111/viewLog.html?tab=buildLog&buildTypeId=bt15&buildId=829&all=true and here: http://ci.rapidftr.com:8111/viewLog.html?tab=buildLog&buildTypeId=bt16&buildId=830&all=true


[21:49:14]: [Execute ec2:full] [Mon, 30 May 2011 21:49:14 +0000] FATAL: Chef::Exceptions::Exec: service[couchdb] (couchdb::default line 42) had an error: /etc/init.d/couchdb restart returned 1, expected 0
[21:49:14]: [Execute ec2:full] Command failed with status (1): [ssh -F /home/jorge/TeamCity/buildAgent/wor...]


After manually starting Solr, the system_spec passes, so those two versions will hopefully be good-to-go after this is fixed.

*Update 2011-09-27: It's been a long time, but I'm guessing I meant to say "after manually starting couchdb" above, since the error in logs is from couchdb not restarting. However it could be couchdb was running fine and Solr needed to be started.*

#716: chef-repo CI build fix for Fedora: "sudo: sorry, you must have a tty to run sudo"

Fedora build fails with "sudo: sorry, you must have a tty to run sudo" as can be seen here in TeamCity: http://ci.rapidftr.com:8111/viewLog.html?tab=buildLog&buildTypeId=bt18&buildId=828&all=true

According to http://www.zimbra.com/forums/installation/10553-solved-sudo-sorry-you-must-have-tty-run-sudo.html we want this in sudoers:


Defaults requiretty
Defaults:%zimbra !requiretty
Defaults:zimbra !requiretty


This shouldn't be a problem for a real user trying to install the system according to our instructions. It's an artifact of the fully automated run TeamCity is doing.

Maybe we can do some sed (awk, grep, whatever) thing in the UserData parameter to the AWS API run_instances call.

#570: Chef cookbook for CouchDB should restart couchdb service

cookbooks/couchdb/recipes/default.rb creates /etc/couchdb/local.ini but when that file changes, the couchdb process is not restarted, so the new config is not picked up.

I can manually restart the service with "sudo /etc/init.d/couchdb restart".

The "notifies" line below was added to address this issue, but it didn't work.


cookbook_file "/etc/couchdb/local.ini" do
source "local.ini"
owner "couchdb"
group "couchdb"
mode "0775"
notifies :restart, "service[couchdb]"
end
RapidFTR User Stories
This is a list of user stories that are either ready for development or in development.

Current Platforms (scroll down):
Web/API (ruby/rails)
BlackBerry (Java)
Deployment/Automation

Signing up for a user story
To sign up for a user story, click the story and read the description. To assign yourself to one of the stories do the following:

1. Click on "Edit Story"
2. Put your name in the "Assigned To" field
3. Choose "In Development" from the dropdown
4. Submit the form

Make sure you announce that you've picked up the story to the Google Group, so we can help you out and keep tabs on what's getting done.

Color codes
Ready for development
In development
Bug / Defect
Defects always have a red color no matter their status.