Auto check item in list if some state(s) changed

Created on 15 February 2012, over 12 years ago
Updated 29 March 2023, over 1 year ago

My proposal (patch) is about usability.
It's convenient to set checked list item in ticket list to avoid Error message if State, Priority or Assigned person changed by user.
It's not so difficult (except may be good idea to use js file for the module)

1 Add registration call to page preparation

function support_page_form(&$form_state, $client = NULL, $state = NULL) {
Line:2618 drupal_add_js(drupal_get_path('module', 'support'). '/support.js');

2 add support.js script:
/**
* Register handlers when document loaded
*/
$(document).ready(function() {
/*Add automatically check items if user select new Priority, State or Assigned in list*/
$('div.form-item select.form-select').change(SelModifiedItem);
});

/*
* Select "modified" checkbox to include item to update list
* when state, priority or assigned has been changed
*/
function SelModifiedItem() {
var item_chboxid = 'edit-tickets-'+ this.id.split('-')[2];
var modified_item_checkbox = document.getElementById(item_chboxid);
modified_item_checkbox.checked = true;
}

πŸ“Œ Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡·πŸ‡ΊRussia lvm

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024