wet-boew / web-reporting

1 stars 2 forks source link

Add a delete assessment team option #34

Closed LaurentGoderre closed 11 years ago

LaurentGoderre commented 11 years ago

See the recap below

dfait-webstandards commented 11 years ago

I recommend removing the number of websites column. It is a nice to have right now, whereas the Delete functionality is a high priority. Also, does the Delete link need to be in a separate column than the Edit link. I think they should be in the same. It keeps in more simple and that one column becomes the "Actions" column instead of a column for each action.

Need: English and French text for confirmation message, "websites exists" message, and "assessment teams exist" message

LaurentGoderre commented 11 years ago

@dfait-webstandards

The number of website is essential for user to understand why some teams can be deleted while others can't. You would alreeady build that logic when checking if a team can be deleted.

I don't have a problem with grouping the edit and delete on the same column.

LaurentGoderre commented 11 years ago

I already included the text for the website exists, see the original spec

LaurentGoderre commented 11 years ago

I wasn't unaware of the unnecessary relationships between assessment teams, websites and assessments.

You would then need to add another column for assigned pages

LaurentGoderre commented 11 years ago

The stored procedure will have to check that there is no assigned web page and return an error if it has. Requirement no 2 becomes

Add a stored procedure to delete an assessment team. The stored procedure MUST check that the team doesn't have any associated website AND associated assessment. If the team has one or many website return and error code (1), if the team has one or many assigned web page return another error code (2). Otherwise return 0

LaurentGoderre commented 11 years ago

Here are the error message to display if there are assigned web pages

dfait-webstandards commented 11 years ago

Essential: Delete Assessment team IF not associated to websites AND does not have any assigned web pages Nice to have: Number of assigned web pages, number of associated websites displayed on ADM Orgs page

Oh, and the relationship between assessment team, website, and assessment is not unnecessary. It tracks who performed the assessment, something you may find a lot of value in when reassessing submitted reports.

LaurentGoderre commented 11 years ago

@dfait-webstandards the relationship between assessment team and website is not usefull because there could be more than one team assessing a same website. Only the assessment and assessment team relationship is useful.

LaurentGoderre commented 11 years ago

@dfait-webstandards I understand that your point of view however, this is essential for us. Everything in the spec needs to be done.

LaurentGoderre commented 11 years ago

There also must be a confirmation message when selecting the delete link:

LaurentGoderre commented 11 years ago

Here is a recap of the spec

delete_teams

  1. In the 'Manage assessment team' add a column that shows the number of websites and assessments associated to each assessments teams.
    • Number of associated websites (English)
    • Number of assigned Web pages (English)
    • Nombre the sites Web associés (French)
    • Nombre the pages Web associés (French)
  2. Add a link called 'Delete' in English and 'Supprimer' in French after the edit button for teams that have 0 websites and 0 assessments associated to them.
  3. Add a stored procedure to delete an assessment team. The stored procedure MUST check that the team doesn't have any associated website or assessments. If it has one or more associated website return the error code 1, if it has assessments, return the error code 2, otherwise return 0.
  4. In the application, when the delete button is clicked a confirmation is displayed:
    • 'Are you sure you want to delete this assessment team?' (English)
    • 'Êtes-vous certain de vouloir supprimer cette équipe?' (French)
  5. If the user selects yes, the store procedure is executed and the application returns to the 'Manage assessment team' page.

If the error code 1 is returned from the stored procedure, show the following error message:

If the error code 2 is returned from the stored procedure, show the following error message:

If no error is returned display the following message:

FarazAliKhan commented 11 years ago

fixed

dzhaotbs commented 11 years ago

Tested and passed.