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

Added Enterprise Data Exports Report #35462

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mjriley
Copy link
Contributor

@mjriley mjriley commented Dec 2, 2024

Product Description

Enterprise Dashboard:
image

API:
image

Generated Report:
image

Technical Summary

Associated ticket: https://dimagi.atlassian.net/browse/SAAS-16298

Feature Flag

No feature flag, as we're doing iterative releases for this

Safety Assurance

Safety story

Tested locally

Automated test coverage

No automated tests so far. The generation logic should eventually be moved into its own functionality. That is the functionality I'd like to write tests for, but I think that is pending the approval of the iterators PR, which sets the precedent for this.

QA Plan

TBD, but this should go through QA.
QA should verify that the following are listed on the report/API:

  • Form Export
  • Case Export
  • Form Daily Saved Export
  • Case Daily Saved Export
  • Form Excel Integration
  • Case Excel Integration

Nothing else should appear on the report, so its valid to test that something like PowerBI feeds do not appear here.

Rollback instructions

  • This PR can be reverted after deploy with no further considerations

Labels & Review

  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

@mjriley mjriley added the product/admin Change affects admin pages only visible to super users / staff label Dec 2, 2024
@mjriley mjriley force-pushed the mjr/data-exports-report branch from 9fd706e to cc754ce Compare December 2, 2024 20:32
Copy link
Contributor

@jingcheng16 jingcheng16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comment also left a question in tech spec.

return bundle

def get_primary_keys(self):
return ('domain', 'export_type', 'export_subtype', 'name')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested on staging, I can have two export in same domain, with same export_type, export_subtype and name. In this case, adding owner won't be helpful. Should we add some other attribute like export_id?

class EnterpriseDataExportReport(EnterpriseReport):
title = gettext_lazy('Data Exports')

def __init__(self, account, couch_user):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tada! Got you! Same issue as mine when you reviewed my PR lol.

elif doc_type == CaseExportInstance.__name__:
return _('Case')
else:
return _('Unknown')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In what case it will be unknown?

SUBTYPE_MAP = {
is_standard: gettext_lazy('Standard'),
is_daily_saved_export: gettext_lazy('Daily Saved Export'),
is_excel_integration: gettext_lazy('Excel Integration'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we don't support PowerBi/tableau integration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product/admin Change affects admin pages only visible to super users / staff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants