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

New dynamic field types: Reference and Lens #2298

Closed
bschmalhofer opened this issue May 5, 2023 · 8 comments
Closed

New dynamic field types: Reference and Lens #2298

bschmalhofer opened this issue May 5, 2023 · 8 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bschmalhofer
Copy link
Contributor

Two new field types are deemed to be useful for OTOBO 11.0.x:

Reference
A dynamic field that references another entity, like Ticket, FAQ, or Configitem. Only entities supporting dynamic fields can be linked. The config of an instance of ReferenceDF holds information about the type of the linked objects and optionally further restrictions, like the class of a config item. This is a bit more restrictive than linking via the link table. The reference entity can't be changed via the dynamic fields.

Lens
The name refers to https://en.wikipedia.org/wiki/Bidirectional_transformation. It allows to read and write a dynamic field of an entity that is available via the Reference DF. Not sure whether that really is bijective. The design explicitly allows for direct manipulation of the internals of another object. So care must be taken when defining a dynamic field of the type Lens. The config of Lens DFs hold dynamic field id of a Reference DF and the dynamic field id of a DF that is supported by the Reference DF.

@bschmalhofer bschmalhofer added the enhancement New feature or request label May 5, 2023
@bschmalhofer bschmalhofer added this to the OTOBO 11.0.1 milestone May 5, 2023
@bschmalhofer bschmalhofer self-assigned this May 5, 2023
@bschmalhofer
Copy link
Contributor Author

This feature is based on the enhancements done for #2251.

@bschmalhofer
Copy link
Contributor Author

I noticed that dynamic fields types are declared in different XML files. This makes sense for specialized dynamic fields types, like the types used by process management. But it makes no sense that generally usable dynamic fields like Text or Multiselect are declared in Ticket.xml.

@StefanAbel-OTOBO
Copy link
Contributor

Please make sure that the objects are actually linked to each other (so that you can scroll down to the link objects and reach them).
(I'm just trying to make sure that I have the same understanding of "linked".)

@svenoe
Copy link
Contributor

svenoe commented May 5, 2023

Please make sure that the objects are actually linked to each other (so that you can scroll down to the link objects and reach them). (I'm just trying to make sure that I have the same understanding of "linked".)

No, they won't be linked via standard links. (We can think about an extension which does this later, but not currently.)

@svenoe
Copy link
Contributor

svenoe commented May 5, 2023

I noticed that dynamic fields types are declared in different XML files. This makes sense for specialized dynamic fields types, like the types used by process management. But it makes no sense that generally usable dynamic fields like Text or Multiselect are declared in Ticket.xml.

As written before, the dynamic fields in Ticket.xml are the OTRS standard dynamic fields. The config of special dynamic fields like Webservices etc., which were added with OTOBO were written to a separate file. This is not consistent and can be improved, but it has no high priority either.

bschmalhofer added a commit that referenced this issue Jun 7, 2023
The reference dynamic field needs object type specific plugins.
For now there is only a plugin for Tickets.
bschmalhofer added a commit that referenced this issue Jun 7, 2023
provided by the layout object
bschmalhofer added a commit that referenced this issue Jun 7, 2023
bschmalhofer added a commit that referenced this issue Jul 7, 2023
Limit the scope of some variables.
bschmalhofer added a commit that referenced this issue Jul 7, 2023
Eliminate unused variable $Object.
Work with %Data instead of $Data.
bschmalhofer added a commit that referenced this issue Jul 7, 2023
bschmalhofer added a commit that referenced this issue Jul 7, 2023
in the edit mask for the Reference dynamic field
bschmalhofer added a commit that referenced this issue Jul 7, 2023
enhance code comments
reduce scope of some variables
empty line before control flow
use the defined or operator
bschmalhofer added a commit that referenced this issue Jul 7, 2023
for getting the referenced object ID
and for getting the relevant config or the dynamic field that is lensed into
bschmalhofer added a commit that referenced this issue Jul 7, 2023
bschmalhofer added a commit that referenced this issue Jul 19, 2023
when autocompleting tickets
bschmalhofer added a commit that referenced this issue Jul 19, 2023
bschmalhofer added a commit that referenced this issue Jul 24, 2023
The ObjectType gives information what the passed ObjectID means. Currently this is only relevant
for distinguishing between ITSMConfigItem and ITSMConfigItemVersion.
bschmalhofer added a commit that referenced this issue Jul 24, 2023
Issue #2298: pass the relevant ObjectType to ValueSet.
svenoe pushed a commit that referenced this issue Jul 27, 2023
…s respect the reference object of the edit mask if applicable.
svenoe pushed a commit that referenced this issue Aug 15, 2023
* Added possibility to define filter for reference fields.
Added possibility to make generic config settings multiselect.

* Added PossibleNone setting to dynamic field reference.

* Removed Validate_Required class from df reference filter list.

* Fixed reference field restrictions for AgentTicketPhone.

* Adapted ajax update changes to other masks.

* Added sysconfig to use dynamic field reference search in customer frontend.

* Adapted reference filter changes to CustomerTicketProcess.
Added ToDo comments.

* Made autocomplete config usable in customer interface in reference driver.
Fixed filtering for changed elements matches in reference filter list.

* Adapt changes from config item reference field to ticket reference field.

* Added some corrections to value passing in ticket modules.
bschmalhofer added a commit that referenced this issue Aug 16, 2023
The goal of these changes is that the code of related frontend modules
should become more similar again. This makes it easier to spot divergences
that are not intended. There could be fixed in one frontend that are relevant
for other frontends too.
bschmalhofer added a commit that referenced this issue Aug 16, 2023
A recent addition is that helper subs like _Mask() and _MaskPhone() now get
the additional parameter DFValues. But these helper subs are also called
in the case of error, or when a form draft was loaded. In these instances
the new parameter DFValues was missing.
This patch should fix three test failures.
bschmalhofer added a commit that referenced this issue Aug 16, 2023
@bschmalhofer
Copy link
Contributor Author

More developments took place in the mean time and new developments should have dedicated issues. So, closing this issue.

svenoe pushed a commit that referenced this issue Feb 26, 2024
stefanhaerter added a commit that referenced this issue Feb 26, 2024
stefanhaerter added a commit that referenced this issue Feb 26, 2024
stefanhaerter pushed a commit that referenced this issue Feb 26, 2024
stefanhaerter added a commit that referenced this issue Feb 26, 2024
stefanhaerter added a commit that referenced this issue Feb 26, 2024
svenoe pushed a commit that referenced this issue Feb 26, 2024
svenoe pushed a commit that referenced this issue Feb 26, 2024
svenoe pushed a commit that referenced this issue Feb 26, 2024
stefanhaerter added a commit that referenced this issue Feb 27, 2024
stefanhaerter added a commit that referenced this issue Feb 27, 2024
svenoe pushed a commit that referenced this issue Feb 27, 2024
svenoe pushed a commit that referenced this issue Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants