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

Allow creation of DateTime objects from CPAN DateTime objects #1993

Closed
bschmalhofer opened this issue Oct 23, 2022 · 5 comments
Closed

Allow creation of DateTime objects from CPAN DateTime objects #1993

bschmalhofer opened this issue Oct 23, 2022 · 5 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bschmalhofer
Copy link
Contributor

In OTOBO 10.1 there is a kind of secret possibility to create instances of Kernel::System::DateTimeby passing a DateTimeobject via the parameter _CPANDateTimeObject. This approach should be made official for OTOBO 11.0.

@bschmalhofer bschmalhofer added the enhancement New feature or request label Oct 23, 2022
@bschmalhofer bschmalhofer added this to the OTOBO 11.0 milestone Oct 23, 2022
@bschmalhofer bschmalhofer self-assigned this Oct 23, 2022
@svenoe svenoe removed the enhancement New feature or request label Feb 10, 2023
@svenoe
Copy link
Contributor

svenoe commented Feb 10, 2023

Is permitted.

@svenoe svenoe closed this as completed Feb 10, 2023
@svenoe
Copy link
Contributor

svenoe commented Feb 10, 2023

Please add a comment that it is allowed for K::S::DT

@svenoe svenoe reopened this Feb 10, 2023
bschmalhofer added a commit that referenced this issue Mar 3, 2023
bschmalhofer added a commit that referenced this issue Mar 3, 2023
as a constructor parameter to Kernel::System::DateTime.
bschmalhofer added a commit that referenced this issue Mar 3, 2023
@bschmalhofer
Copy link
Contributor Author

Renamed the secret parameter _CPANDateTimeObject to CPANDateTimeObject, updated the POD and added a test. Closing this issue.

@bschmalhofer
Copy link
Contributor Author

bschmalhofer commented Mar 4, 2023

Reopening. Currently the passed in CPANDateTime is simple stored as the internal object. But this allows action at a distance, which is usually not expected.

TODO:

  • add a test that there is no action at a distance
  • fix the failing test

@bschmalhofer bschmalhofer reopened this Mar 4, 2023
bschmalhofer added a commit that referenced this issue Mar 4, 2023
bschmalhofer added a commit that referenced this issue Mar 4, 2023
Changing the source object should not affect the target object.
bschmalhofer added a commit that referenced this issue Mar 4, 2023
For avoiding potetial action at a distance.
bschmalhofer added a commit that referenced this issue Mar 4, 2023
@bschmalhofer
Copy link
Contributor Author

Cloned the passed in CPANDateTime object and did some cleanup. Tests look fine. Closing this issue again.

@bschmalhofer bschmalhofer modified the milestones: OTOBO 11.0, OTOBO 11.0.1 May 21, 2024
@bschmalhofer bschmalhofer added the enhancement New feature or request label May 22, 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

2 participants