-
Notifications
You must be signed in to change notification settings - Fork 278
N°4032 - On UserRequest, service subcategory no more limited by request_type #786
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
base: develop
Are you sure you want to change the base?
Conversation
datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml
Outdated
Show resolved
Hide resolved
Hipska
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the request_type field now be dependant from subcategory_id and made read-only?
For the dependency, it would make sense if it was recomputed it in the DB_EVENT_COMPUTE_VALUES, but as it is done on a DB_EVENT_BEFORE_WRITE, the dependency would have no effect. At the end the result, is the same, so it's good enough, I will tackle other topics. |
|
It would have been nicer indeed if it was implemented as Anyway, accepted as-is. |
| <filter><![CDATA[SELECT ServiceSubcategory WHERE service_id = :this->service_id AND (ISNULL(:this->request_type) OR request_type = :this->request_type) AND status != 'obsolete']]></filter> | ||
| <filter><![CDATA[SELECT ServiceSubcategory WHERE service_id = :this->service_id AND status != 'obsolete']]></filter> | ||
| <dependencies> | ||
| <attribute id="service_id"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why keep this second explicit dependence (it will be computed anyhow)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To not be able to select ServiceSubcategory from another Service. What do you mean with "it will be computed"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Hipska, since about 2 or 3 years, the field dependencies are useless when due to a filter. iTop automatically add the dependency on field specified in the filter. But dependency remains useful when due to a PHP computation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you're saying that in the console selecting a Service, and not having this dependency at subcategory, the refresh of that list will happen anyways because :this->service_id is used in the filter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, console and portal
| <code><![CDATA[ public function ComputeValues() | ||
| { | ||
| // Compute the priority of the ticket | ||
| $this->Set('priority', $this->ComputePriority()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As soon as this changes, I would like it to be fully aligned with the recommendation => event based.
Two handlers could be called : EvtComputePriority and EvtComputeRequestType.
Base information
Symptom (bug) / Objective (enhancement)
Reproduction procedure (bug)
Cause (bug)
Proposed solution (bug and enhancement)
Checklist before requesting a review
Checklist of things to do before PR is ready to merge