Roundup Tracker - Issues

Issue 2550911

classification
Title: make default_value in hyperdb work or at least document its use.
Type: Severity: normal
Components: Versions:
process
Status: new Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: rouilj
Priority: Keywords:

Created on 2016-06-30 23:38 by rouilj, last changed 2016-06-30 23:38 by rouilj.

Messages
msg5690 Author: [hidden] (rouilj) Date: 2016-06-30 23:38
In:

  changeset:   4481:9bbf3758c16a
  user:        Stefan Seefeld <stefan@seefeld.name>
  date:        Thu Apr 14 12:47:48 2011 +0000
  files:       roundup/cgi/templating.py roundup/hyperdb.py
  description:
  Allow default value declaration in DB schema.

added the ability to invoke the hyperdb classes with
default_value=something.

E.G.

 prop=String(default_value="no value set")
 prop=Boolean(default_value=True)

It assigns self.__default_value to the value that is passed and
defines the get_default_value() method that can return that value, but
it looks like get_default_value() is only used in cgi/templating.py.

Is there some reason that only cgi/templating does this? I would think
email issue creation, issue creation by roundup_admin etc. should get
this default value as well.

So if a new (issue, user ...) class is created and there is no value
for the property, it should get that property automatically.

In any case we should probably document this option better. I added a
little bit of docs recently but....

Does anybody have more history on this?h
History
Date User Action Args
2016-06-30 23:38:23rouiljcreate