Project

General

Profile

feature request #8062

Make default preferences deletable serverside

Added by Andreas Müller almost 3 years ago. Updated about 1 month ago.

Status:
Closed
Priority:
Priority14
Category:
cdmlib
Target version:
Start date:
02/04/2019
Due date:
% Done:

100%

Severity:
normal
Tags:

Description

Currently when storing a CdmPreference it can not be checked if it holds the default value and therefore can be deleted. This is because CdmPreference holds the predicate as string only and therefore does not hold the default value. Only for those predicates defined server side it is possible to retrieve default value.

There are various possibilities to pass the default value.

  1. Use IPreferencePredicate in CdmPreference.prefKey instead of String
  2. Override set(CdmPreference) in PreferenceService to allow to pass an extra attribute "default value"
  3. Leave it to the client to delete default values (this requires a delete method) => we finally took this solution, see also #8045
  4. tbc

Related issues

Related to Edit - bug #7849: Improve DB Preferences handling and saving in TaxEditor Closed 10/23/2018
Related to Edit - feature request #7902: Allow default values for PreferencePredicates Closed 11/12/2018
Related to Edit - feature request #8045: Improve handling of default values and override in local preferences Feedback 01/31/2019
Copied to Edit - task #9826: Move pure TaxEditor predicates back to taxeditor code New 10/26/2021

Associated revisions

Revision 3eecdd85 (diff)
Added by Andreas Müller almost 3 years ago

ref #8062 first implementation to delete default preferences (only for cdmlib predicates)

Revision 0504b50c (diff)
Added by Andreas Müller almost 3 years ago

ref #8062 fix NPE in TaxonGraphTest

Revision 3c2c16c0 (diff)
Added by Katja Luther almost 3 years ago

ref #8062: add editorPreferencePredicates to PreferencePredicates and create enums

History

#1 Updated by Andreas Müller almost 3 years ago

  • Related to bug #7849: Improve DB Preferences handling and saving in TaxEditor added

#2 Updated by Andreas Müller almost 3 years ago

#3 Updated by Andreas Müller almost 3 years ago

The first implementation seems to work for all server side preferences using PreferencePredicates. This is only a first step.

#4 Updated by Andreas Müller almost 3 years ago

  • Status changed from New to In Progress
  • Target version changed from Release 5.5 to Release 5.6

#5 Updated by Andreas Müller almost 3 years ago

  • Priority changed from New to Highest

#6 Updated by Andreas Müller over 2 years ago

  • Target version changed from Release 5.6 to Release 5.7

#7 Updated by Andreas Müller over 2 years ago

  • Target version changed from Release 5.7 to Release 5.8

#8 Updated by Andreas Müller 5 months ago

  • Status changed from In Progress to Resolved
  • Target version changed from Release 5.8 to Release 5.25
  • % Done changed from 0 to 30

Check, how far this is fixed. Create open issues ticket and move this ticket back to 5.8

#9 Updated by Andreas Müller 5 months ago

  • Target version changed from Release 5.25 to Release 5.29

#10 Updated by Andreas Müller 2 months ago

  • Priority changed from Highest to Priority14

#11 Updated by Andreas Müller about 1 month ago

  • Related to feature request #8045: Improve handling of default values and override in local preferences added

#12 Updated by Andreas Müller about 1 month ago

  • Description updated (diff)

In later discussions (e.g. related to #8045) we decided that it makes sense to distinguish default values (not existing values) from preferences that has the same value as the default value. This has an advantage in case a default value of a preference changes as you can still distinguish between an explicitly chosen value (similar to the default value) and a non-chosen value (a real default value).
Also it makes the handling between serverside preferences and client side preferences easier.

#13 Updated by Andreas Müller about 1 month ago

  • Copied to task #9826: Move pure TaxEditor predicates back to taxeditor code added

#14 Updated by Andreas Müller about 1 month ago

  • Description updated (diff)
  • Status changed from Resolved to Closed
  • Target version changed from Release 5.29 to Release 5.8
  • % Done changed from 30 to 100

So we finally chose solution 3 (from the ticket description) and had to revert some of the changes made here previously (#8045). The ticket can be closed.
We still may move the pure editor predicates back to TaxEditor code (#9826)

#15 Updated by Andreas Müller about 1 month ago

  • Tags set to preferences

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)