Bug 46797 - Make date format in the importer configurable
Make date format in the importer configurable
Status: CLOSED WONTFIX
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 4.3
Other All
: P5 normal (vote)
: ---
Assigned To: UCS@school maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-04-09 13:39 CEST by Michel Smidt
Modified: 2023-06-12 15:39 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.046
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Usability
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Smidt 2018-04-09 13:39:12 CEST
Currently it is only possible to import users with one specific date format (). Unfortunately that it is not very user friendly because in almost all cases the import date format of customers is somehow different. This leads to manual adjustments. I suggest a configruation variable in the import configuration which can be defined like pythons "strptime" e.g. '%b %d %Y %I:%M%p'
Comment 1 Daniel Tröder univentionstaff 2018-04-09 14:37:18 CEST
Is the date format for the birthday or another attribute?

There is a ucs-test that shows how to rewrite the string for a birthday in  a format hook from '%Y.%b.%d' to '%Y-%m-%d':
* The test: ucs-test-ucsschool/90_ucsschool/224_import-users_test_format_hook
* the format hook: ucs-test-ucsschool/90_ucsschool/testformathookpy

Format hooks are there to solve exactly the described problem, but in a more general way that can be used for all properties.

Can the solution for this bug be just that: Adding an easily customizable format hook to the hooks repository?
Comment 2 Jan-Luca Kiok univentionstaff 2023-06-12 15:32:06 CEST
This issue has been filed against UCS@school 4.3 or earlier.

UCS 4.3 is out of maintenance and UCS components have vastly changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen this issue. In this case please provide detailed information on how this issue is affecting you.