-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feature group managed ola #19593
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: main
Are you sure you want to change the base?
feature group managed ola #19593
Conversation
028c139
to
6abca80
Compare
82524f3
to
73ed39c
Compare
2cdabea
to
6a2478a
Compare
d4e606f
to
e6660fe
Compare
e6660fe
to
846746f
Compare
0e3a22f
to
6b9b8b2
Compare
b679d9c
to
f359192
Compare
* @param CommonDBTM<T> $item | ||
* @return T | ||
*/ | ||
protected function reloadItem(CommonDBTM $item): CommonDBTM |
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.
You shouldn't need a new item instance in most cases. getFromDB
replaces all of the fields. If some old data remains, it may be an indication of a missing post_getFromDB
.
$item->getFromDB($item->getID);
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.
I was not sure, to I decided to create a new Object, this is to be sure that anything hidden remains.
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.
Remaining values inside the object is the problem, as you noticed.
In tests we can use the same object for convenience. But in source code, the object saving and loading don't happens at the same time. I don't think I introduced this kind of problem (no cache or static data implemented). But getting a fresh object is a way to be closer of real usage and avoid special cases.
It's more safe and we avoid having a test to pass because of remaining data (which is not the case at runtime, not in tests).
On the other hand, the code tend to use the same variable object to do different things. But that's a bad practice imo.
What do you think about it @cedric-anne ?
071267e
to
9ffbe4f
Compare
ea43204
to
3729b85
Compare
only the one that can be assigned to a ticket are shown.
38616c6
to
08b4eeb
Compare
05e52e5
to
8019bfe
Compare
@SebSept : Small issue. This field doesn’t seem relevant here: ![]() Moreover, when a change is made and a date is displayed, the calendar icon on the right does nothing when clicked. ![]() |
this is a readonly datetime input, not the best option. I just removed this field from display. |
- testOlaTtoIsNotCompleteWhenTicketIsAssignedToDedicatedGroupByRuleAndOlaIsAddedByRule() - testOlaTtoIstCompleteWhenTicketIsAssignedToDedicatedGroupByRuleAndOlaIsAddedByRuleThenGroupRemoved()
Group managed OLA
Checklist before requesting a review
Please delete options that are not relevant.
Description
Screenshots (if appropriate):