← Back to team overview

dhis2-devs team mailing list archive

Deletion of DataElements or Indicators that are used in Favourites

 

Hi,

I am able to successfully delete a Data Set and all corresponding
DataElements and Indicators and corresponding data via the Web API. However
when I then go and attempt to load a Favourite that was created referencing
elements that are now deleted, I get the error

Code 409
Status: Conflict
Dimension dx is present in query without any valid dimension options

(see attached screenshot)

This doesn't give the user any idea that the favourite is no longer valid
because the underlying elements have been deleted. In order for this
functionality to make sense to the user I want to do one of the following:

   1. Prior to deleting the Data Set and related objects, query for all
   favourites that use any items to be deleted and list them and allow the
   user the option to have them programatically deleted.
   1. Is it possible to query for favourites by their corresponding data
      elements and indicators via the API?
      2. Is it possible to delete a favourite via the API?
   2. If #1 above is not possible, is it possible to show a more meaningful
   message to the user that lets them know why a favourite cannot be loaded?

I am using version:
2.25
Build revision:
9f6b262
Build date:
2017-02-16 06:42

Thanks,

Lorill


-- 
Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd. <http://www.2paths.com>

Attachment: DHIS2_Pivot_Favourite_Error.png
Description: PNG image


Follow ups