Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to IATI statuses #2189

Closed
6 tasks done
KasperBrandt opened this issue May 13, 2016 · 7 comments
Closed
6 tasks done

Move to IATI statuses #2189

KasperBrandt opened this issue May 13, 2016 · 7 comments
Assignees
Milestone

Comments

@KasperBrandt
Copy link
Contributor

KasperBrandt commented May 13, 2016

This is probably a bigger issue than we expect, but we should replace the current project.status with the IATI entries. A mapping will be done like this:

STATUS_TO_CODE = {
    'N': '6',
    'H': '1',
    'A': '2',
    'C': '3',
    'L': '5',
    'R': '6',
}
@damienallen
Copy link
Contributor

damienallen commented May 24, 2016

Report templates (project overview) will need to be updated to use IATI codes:

STATUS_NONE = '6'
STATUS_NEEDS_FUNDING = '1'
STATUS_ACTIVE = '2'
STATUS_COMPLETE = '3'
STATUS_POST_COMPLETE = '4'
STATUS_CANCELLED = '5'
STATUS_ARCHIVED = '6'

API calls with filter ?status=X will need to be updated as well. Maybe this is something used in Up?

@Geerts @stellanl

@KasperBrandt
Copy link
Contributor Author

After a short discussion this morning, @damienallen and I decided to keep the current project.status field as is for legacy reasons (e.g. API, ReportServer, etc) and create a new field project.iati_status which stores the IATI statuses.

@damienallen
Copy link
Contributor

damienallen commented May 25, 2016

Test plan (WIP)

IATI import/export:

  • Make sure both project.iati_status and project.status are set correctly for imports and exports
  • Make sure invalid codes are handled correctly (set to status 0) on import

Organisation page:

  • Check that project status labels and counts are correct
  • Check whether the counts link to appropriate filters
  • Confirm that sizing/styling of labels is correct

Project list:

  • Check status labels and coloring
  • Check that both ?status= and ?iati_status= filters work correctly

Project page:

  • Check status labels and coloring
  • Check whether the donate button is disabled for suspended, cancelled and completed projects

Project editor:

  • New projects should be created with 'None' iati status (status 0, blank in editor)
  • Status field should be replaced by IATI Status field
  • Editor progress bar should only progress if status is selected
  • Help text should be proofread

Widgets:

  • Check whether the new IATI statuses are displayed
  • Check whether the widgets are formatted correctly (especially for status 1)

Legacy support:

  • Try updating project.status and make sure changes also reflect in project.iati_status
  • Unit tests for existing calls to API referencing project status
  • Make sure status is still correctly handled by report server

Management:

  • Make sure migrations work correctly: project.status copied to project.iati_status with appropriate codes and project.iati_status set as mandatory in rsr_projecteditorvalidation
  • Make sure funds_needed management command still marks projects as complete

@KasperBrandt
Copy link
Contributor Author

KasperBrandt commented Jun 6, 2016

Just discussed with Marten and Mark;

  • Add 'No status' as default with empty string as code
  • New mapping of statuses:

Map None -> No status
Map Archived - > No status, Completed or Cancelled (check this list for an overview of archived projects and their new status).

@KasperBrandt
Copy link
Contributor Author

KasperBrandt commented Jun 8, 2016

Test plan (2)

  1. Re-migrate 0075 and 0076 (backwards and forwards);
  2. Check that the status can be empty in the project editor, and that it is stored in the DB as an empty string;
  3. Check that 'Archived' projects in general are now mapped to 'Completion';
  4. On Test/UAT: Check this list for an overview of archived projects and their new status.

damienallen added a commit that referenced this issue Jun 8, 2016
damienallen added a commit that referenced this issue Jun 8, 2016
@KasperBrandt
Copy link
Contributor Author

KasperBrandt commented Jun 8, 2016

Test plan (3)

  1. Check that the status field in the advanced filters section now displays the IATI statuses
  2. Check that a project without a status does not display the 'Status' header, on both the projects listing page and the project page itself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants