Skip to content
Snippets Groups Projects
Commit 50980e25 authored by Jared Hancock's avatar Jared Hancock
Browse files

Make priority field type NOT changeable

This is necessary because the system depends ticket priority to sort and
display ticket data.
parent 1b089118
Branches
Tags
No related merge requests found
......@@ -54,10 +54,13 @@ class DynamicForm extends VerySimpleModel {
}
function getDynamicFields() {
if (!isset($this->_dfields))
if (!isset($this->_dfields)) {
$this->_dfields = DynamicFormField::objects()
->filter(array('form_id'=>$this->id))
->all();
foreach ($this->_dfields as $f)
$f->setForm($this);
}
return $this->_dfields;
}
......
......@@ -798,6 +798,10 @@ class PriorityField extends ChoiceField {
function hasIdValue() {
return true;
}
function isChangeable() {
return $this->getForm()->get('type') != 'T' ||
$this->get('name') != 'priority';
}
function getChoices() {
global $cfg;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment