Closed lu-hamani closed 5 years ago
@armandfardeau @moustachu Just rewrote this to match what we said in our last team meeting. I assume we need to list all the data linked to a proposal first, to make sure that exporting all is relevant (correct me if I am mistaken). In the meantime, what are technical/performance obstacle you foresee about this enhancement ?
@lu-hamani
For now it's Level 2 "as long as we consider data directly linked to a proposal" :
We will start with the 2 links issues (users & withdrawn) but feel free 😑 to add any of these :
## PROPOSALS ACTIVE MODEL
# include Decidim::HasComponent
belongs_to :component
delegate :organization, to: :component
delegate :participatory_space, to: :component
# include Decidim::Resourceable
has_many :resource_links_to
has_many :resource_links_from
has_one :resource_permission
# include Decidim::Coauthorable
has_many :coauthorships, -> { order(:created_at) }
has_many :user_groups, -> { order(:created_at) }
# include Decidim::ScopableComponent
belongs_to :scope
delegate :scopes, to: :organization
delegate :scopes_enabled, to: :participatory_space
# include Decidim::HasReference
has_one :reference
# include Decidim::HasCategory
has_one :categorization, as: :categorizable
has_one :category, through: :categorization
# include Decidim::Reportable
has_one :moderation
has_many :reports, through: :moderation
# include Decidim::HasAttachments
has_many :attachments
# include Decidim::Followable
has_many :followable
has_many :followers
# include Decidim::Proposals::CommentableProposal
has_many :comment_threads
has_many :comments
# include Decidim::Searchable
has_many :searchable_resources
# include Decidim::Traceable
has_many :versions
delegate :count, to: :versions
# include Decidim::Loggable
# include Decidim::Fingerprintable
has_one :fingerprint
# include Decidim::Hashtaggable
has_many :hashtag
# include Decidim::Proposals::ParticipatoryTextSection
has_one :participatory_text_level
# include Decidim::Amendable
has_many :amendments
has_many :emendations # --> resources that have amend the resource
has_many :amenders # --> users that have emendations for the resource
has_one :amended # --> the original resource that was amended
has_one :amendable
# from model class
has_many :endorsements
has_many :votes
has_many :notes
User Story As an admin, I want to export all the data linked to a proposal so that I can analyze properly my users' contributions and participation.
Sub-user stories :
Acceptance Criteria When I click to export a component data, I select what is the format of my export. Then when I open the file, it includes all the data linked to the components exported.