# HG changeset patch # User John Rouillard # Date 1466993440 14400 # Node ID ca3e56590fcdd76fdc6ac5163d0b0663252a4c3f # Parent c52714a694322a409306747bb86d33f77f954732 Fixed issue2550572: setting nosy=+foo on multiple issues gives them all the same exact nosy list. Added a missing reinitialization that has to occur every time though the loop in do_set. Manually tested with: python roundup/scripts/roundup_admin.py -i demo set issue184,issue17 nosy=demo python roundup/scripts/roundup_admin.py -i demo set issue17 nosy=+alpha,+anonymous python roundup/scripts/roundup_admin.py -i demo set issue184 nosy=+beta,+anonymous python roundup/scripts/roundup_admin.py -i demo set issue184,issue17 nosy=-demo,-anonymous,+admin issue17 nosy was admin,alpha issue 184 nosy was admin,beta after tests. diff -r c52714a69432 -r ca3e56590fcd CHANGES.txt --- a/CHANGES.txt Sun Jun 26 20:56:30 2016 -0400 +++ b/CHANGES.txt Sun Jun 26 22:10:40 2016 -0400 @@ -165,6 +165,10 @@ Fix old entry in FAQ, update roundup-server config docs and example file from current roundup-server output. Update some typos in .py files. John Rouillard. +- issue2550572: setting nosy=+foo on multiple issues gives them all + the same exact nosy list. Fixed a missing reinitialization that has + to occur every time though the loop in do_set. Manual tests work. + (John Rouillard) 2016-01-11: 1.5.1 diff -r c52714a69432 -r ca3e56590fcd roundup/admin.py --- a/roundup/admin.py Sun Jun 26 20:56:30 2016 -0400 +++ b/roundup/admin.py Sun Jun 26 22:10:40 2016 -0400 @@ -608,6 +608,8 @@ is un-set. If the property is a multilink, you specify the linked ids for the multilink as comma-separated numbers (ie "1,2,3"). """ + import copy # needed for copying props list + if len(args) < 2: raise UsageError(_('Not enough arguments supplied')) from roundup import hyperdb @@ -628,15 +630,21 @@ raise UsageError(message) # get the props from the args - props = self.props_from_args(args[1:]) + propset = self.props_from_args(args[1:]) # parse the cli once # now do the set for all the nodes for classname, itemid in designators: + props = copy.copy(propset) # make a new copy for every designator cl = self.get_class(classname) - properties = cl.getprops() for key, value in props.items(): try: + # You must reinitialize the props every time though. + # if props['nosy'] = '+admin' initally, it gets + # set to 'demo,admin' (assuming it was set to demo + # in the db) after rawToHyperdb returns. + # This new value is used for all the rest of the + # designators if not reinitalized. props[key] = hyperdb.rawToHyperdb(self.db, cl, itemid, key, value) except hyperdb.HyperdbValueError, message: