Content
Updated by Oliver Günther 10 days ago
**As** an OpenProject user
**I want** to be able to add a link to a custom field type text
**in order to** quickly link to a page.
**Acceptance criteria**
* New custom field type "URL" in the administration settings.
* The URL type has an optional attribute "Regexp" that allows to restrict what URLs/schemes/etc. can be entered with a regex
* The URL type can be marked as required
* The URL type can have a default value
* The URL type can be marked for all projects (possibly bound to change with the changes in the project selection)
* In the work package screen
* When empty, details there is a placeholder icon with "op-link-add" icon (link icon with field where users can add a plus)
* When present, the URL link. Next to it there is shown and an icon beside it
that allows to add or remove the link.
* IF possible: Clicking on the "op-icon-edit" (to be created) icon will open link opens the field empty
* IF NOT possible: Clicking a pencil icon (tbd) will open target in the field as is with the URL value filled
* Entering same window (not in a parseable URL will be accepted
new tab).
**Open**
* additional regex validation will take place if configured
* open: How flexible do we want URLs to be parsed. e.g., is \`mailto:foo@example.com\` valid? It is a valid URI.
switch between editing and clicking on the link?
* open: auto-parse URLs like `community.openproject.org`
* Entering an invalid or unparseable URL
* will result in _Preference Niels:_ Clicking the field being marked as error
* a toast validation message link opens it. The editing is shown "<field name> is not a valid URL."
triggered by an icon on hover.
* Entering a URL that does not match _Proposal Marc:_ Treat it the regexp
* will result in same way we do with the field being marked as error
* a toast validation message Spent time field. The icon is shown "<field name> is invalid." consistent with other regex custom field validation messages
always there and then switch between add and remove link action.
* Clicking on Do we want the link opens icon to allow editing the target
* If the link existing link? Maybe is on easier to treat the same host, in icon as a add and remove link. When the same window
* If user wants to change the link is on another host, in overrides the existing one and adds a new window (compliance behavior for external links, to be later changed to "external link warning")
one (normally copying it).
**Visuals and Figma**
https://www.figma.com/file/oTMDTvcwrx35qExTkkSKBn/Custom-fields?type=design&node-id=624-13975&mode=design
**I want** to be able to add a link to a custom field type text
**in order to** quickly link to a page.
**Acceptance criteria**
* New custom field type "URL" in the administration settings.
* The URL type can be marked as required
* The URL type can have a default value
* The URL type can be marked for all projects (possibly bound to change with the changes in the project selection)
* In the work package screen
* When empty,
* When present, the URL
* IF NOT possible: Clicking a pencil icon (tbd) will open
* Entering
**Open**
* open: How flexible do we want URLs to be parsed. e.g., is \`mailto:foo@example.com\` valid? It is a valid URI.
* Entering an invalid or unparseable URL
* will result in
* a toast validation message
* will result in
* a toast validation message
* If the link
* If
https://www.figma.com/file/oTMDTvcwrx35qExTkkSKBn/Custom-fields?type=design&node-id=624-13975&mode=design