summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c9fb77c)
raw | patch | inline | side by side (parent: c9fb77c)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 24 Jun 2003 03:51:15 +0000 (03:51 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 24 Jun 2003 03:51:15 +0000 (03:51 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1756 57a73879-2fb5-44c3-a270-3262357dd7e2
CHANGES.txt | patch | blob | history | |
roundup/cgi/client.py | patch | blob | history |
diff --git a/CHANGES.txt b/CHANGES.txt
index 247b7e4218e0510d9eba63151ade45659a6dad4b..4f501b1e66539cb7096c6527b40fb6a021c4f829 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
- handle missing Subject: line (sf bug 755331)
- handle New User creation (sf bug 754510)
- fix hackish message escaping (sf bug 757128)
+- fix :required ordering problem (sf bug 740214)
2003-06-10 0.6.0b3
diff --git a/roundup/cgi/client.py b/roundup/cgi/client.py
index 1394120c8ac535cd30eab7a8c0024cd2c93a6bc0..302d8e38cf6b0a84da51b9435896470e1b59b3f7 100644 (file)
--- a/roundup/cgi/client.py
+++ b/roundup/cgi/client.py
-# $Id: client.py,v 1.120 2003-06-24 03:30:30 richard Exp $
+# $Id: client.py,v 1.121 2003-06-24 03:51:15 richard Exp $
__doc__ = """
WWW request handler (also used in the stand-alone server).
The form value is a comma-separated list of
designators. The item corresponding to each
designator is linked to the property given by simple
- form variable.
-
-XXX Used to add a link to new items created during edit.
-XXX These are collected up and returned in all_links. This will
-XXX result in an additional linking operation (either Link set or
-XXX Multilink append) after the edit/create is done using
-XXX all_props in _editnodes. The <propname> on the current item
-XXX will be set/appended the id of the newly created item of
-XXX class <designator> (where <designator> must be
-XXX <classname>-<N>).
+ form variable. These are collected up and returned in
+ all_links.
None of the above (ie. just a simple form value)
The value of the form variable is converted
default_nodeid = self.nodeid
# we'll store info about the individual class/item edit in these
- all_required = {} # one entry per class/item
- all_props = {} # one entry per class/item
+ all_required = {} # required props per class/item
+ all_props = {} # props present per class/item
all_propdef = {} # note - only one entry per class
all_links = [] # as many as are required
all_required[this] = extractFormList(form[key])
continue
- # get the required values list
- if not all_required.has_key(this):
- all_required[this] = []
- required = all_required[this]
-
# see if we're performing a special multilink action
mlaction = 'set'
if d['remove']:
props[propname] = value
- # register this as received if required?
- if propname in required and value is not None:
- required.remove(propname)
-
# check to see if we need to specially link a file to the note
if have_note and have_file:
all_links.append(('msg', '-1', 'files', [('file', '-1')]))
# see if all the required properties have been supplied
s = []
for thing, required in all_required.items():
+ # register the values we got
+ got = all_props.get(thing, {})
+ for entry in required:
+ if got.get(entry, ''):
+ required.remove(entry)
+
+ # any required values not present?
if not required:
continue
if len(required) > 1: