Changeset 621
- Timestamp:
- 10/21/08 09:17:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/workflowcontrollerplugin/workflowcontroller/controller.py
r620 r621 170 170 if actions.has_key(remove_action) : 171 171 actions.pop(remove_action) 172 173 # now remove the actions that have the change_type operation and 174 #if we don't have the type defined 175 176 # check to see if we have the type defined 177 type_flag = True 178 for key in self.workflow_fields.keys() : 179 field_name, value, option = key 180 if ticket['type'] == value : 181 type_flag = False 182 break 183 184 if type_flag : 185 for action in self.actions.keys(): 186 if 'change_type' in self.actions[action]['operations'] : 187 # if we have more than one operation then just 188 # delete the operation 189 if len(self.actions[action]['operations']) > 1 : 190 self.actions[action]['operations'].remove('change_type') 191 else : 192 # delete the action 193 actions.pop(action) 194 172 195 # transform into a list of tuples 173 196 return_actions = [] 174 197 for key in actions.keys() : 175 198 return_actions.append(( actions[key], key)) 176 # log the processing 177 # self.log.warning('actions for state ' + ticket.values['status'] + ': ' 178 # + str(return_actions)) 199 179 200 # return the list 180 201 return return_actions … … 198 219 199 220 # call the parent 200 action_name, parent_tags, parent_hints = self.parent.render_ticket_action_control(req, ticket, action) 221 action_name, parent_tags, parent_hints = self.parent \ 222 .render_ticket_action_control(req, ticket, action) 201 223 202 224 this_action = self.actions[action] … … 210 232 tag_element = None 211 233 if len(owners) == 1 : 212 tag_element = tag(['to ', tag.input(type='text', value=owners[0], id=id, 213 name=id, )]) 234 tag_element = tag(['to ', 235 tag.input(type='text', 236 value=owners[0], 237 id=id, name=id, )]) 214 238 elif len(owners) > 1: 215 239 tag_element = tag([_("to "), tag.select( … … 283 307 id=id, name=id)])) 284 308 hints.append(_("The resolution will be set. ")) 309 285 310 # if we computed some new control 286 311 if len(control) > 0: … … 317 342 h = _("The %s will be set to %s. ") % (field_name, field_values[0]) 318 343 else: 319 id = self._create_id_for_tag(action, ' resolve_resolution')320 selected_option = req.args.get(id, ticket[' resolution'])344 id = self._create_id_for_tag(action, 'change_type') 345 selected_option = req.args.get(id, ticket['field_name']) 321 346 c = tag(['as ', tag.select( 322 347 [tag.option(x, selected=(x == selected_option or None))
Note: See TracChangeset
for help on using the changeset viewer.
