Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aditional field locked when the ticket is in solved status #426

Closed
BICB4 opened this issue Feb 3, 2021 · 2 comments
Closed

Aditional field locked when the ticket is in solved status #426

BICB4 opened this issue Feb 3, 2021 · 2 comments
Labels
Milestone

Comments

@BICB4
Copy link
Contributor

BICB4 commented Feb 3, 2021

Aditional field locked when the ticket is in solved status.
I made a tab with a satisfaction report to fill after the ticket is solved, but the problem is when the ticket is in status solved it locks additional fields, is there a way to edit code and where to stop the field from being locked.

S2
S1

@BICB4
Copy link
Contributor Author

BICB4 commented Feb 3, 2021

With data from issue #128 , I manage to find a workaround, in file "inc/field.class" on line 633 i change this:

     if ( if (in_array($items_obj->fields['status'], $items_obj->getClosedStatusArray())
|| in_array($items_obj->fields['status'], $items_obj->getSolvedStatusArray())
         || $first_found_p['right'] != CREATE) {
        $canedit = false;
     }
  } else {
     if ($first_found_p['right'] != CREATE) {
        $canedit = false;
     }
  }

to:
if (in_array($items_obj->fields['status'], $items_obj->getSolvedStatusArray())
|| $first_found_p['right'] != CREATE) {
$canedit = true;
}
if (in_array($items_obj->fields['status'], $items_obj->getClosedStatusArray())
|| $first_found_p['right'] != CREATE) {
$canedit = false;
}
} else {
if ($first_found_p['right'] != CREATE) {
$canedit = false;
}
}

So then fields are editable in status "resolved" but locked in status "closed".

It would still be nice to add this as an option in the menu instead of changing the code.

Best regard,
BICB4.

BICB4 added a commit to BICB4/fields that referenced this issue Feb 3, 2021
Instead of locking fields in status "Resolved", they are now still editable but locked in ticket status "Closed" - look issue pluginsGLPI#426
@BICB4
Copy link
Contributor Author

BICB4 commented Feb 3, 2021

Created pull request to implement this in a plugin #427

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants