openMF / community-app

This was the former default web application built on top of the Apache Fineract platform. It's now deprecated and replaced by the the Mifos X Web App (https://github.com/openMF/web-app maintained by the Mifos Initiative as a reference solution for financial inclusion. It is a Single-Page App (SPA) written in web standard technologies.
http://openmf.github.io/community-app/
Mozilla Public License 2.0
313 stars 1.02k forks source link

'Editing Data table' allows to remove columns even though there is a data of client/Group , etc #2169

Closed santoshconflux closed 5 years ago

santoshconflux commented 7 years ago
  1. Go to Admin>System>Manage Data tables
  2. Create a data table with at least one column(or more).
  3. Enter data in the data table for particular client and submit it.
  4. Edit data table (System>Manage Datatables) and remove all columns and submit it.
  5. It is allowing to submit with no columns even though there is a data with that column for particular client/Group, etc.
wkk91193 commented 7 years ago

Will try to work on this!

skprabhanjan commented 7 years ago

@santoshmath , Fixed this, sent a PR #2186 . Please verify. Thanks:)

avikganguly01 commented 7 years ago

This is a validation which has more to do with ensuring that there is no loss of data. IF and only IF this requirement needs to be met, a validation like this can be added to the backend -

select  case when columnToBeDeleted is not null then 'true' else 'false' end allowDelete
  from datatable where columnToBeDeleted is not null limit 1;

If validation returns false, column can be deleted.

santoshconflux commented 5 years ago

Fineract side issue: https://issues.apache.org/jira/browse/FINERACT-439.

Closed here.