Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
f041ab73
Commit
f041ab73
authored
4 years ago
by
Guillaume Heurtier
Browse files
Options
Downloads
Patches
Plain Diff
FEAT #14383 TIME 0:20 fix custom fields tu
parent
ea813dbb
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
migration/20.10/2010.sql
+1
-1
1 addition, 1 deletion
migration/20.10/2010.sql
sql/structure.sql
+3
-0
3 additions, 0 deletions
sql/structure.sql
test/unitTests/app/customField/CustomFieldControllerTest.php
+3
-0
3 additions, 0 deletions
test/unitTests/app/customField/CustomFieldControllerTest.php
with
7 additions
and
1 deletion
migration/20.10/2010.sql
+
1
−
1
View file @
f041ab73
...
@@ -298,7 +298,7 @@ UPDATE res_attachments SET attachment_type = 'reply_record_management' WHERE att
...
@@ -298,7 +298,7 @@ UPDATE res_attachments SET attachment_type = 'reply_record_management' WHERE att
ALTER
TABLE
custom_fields
DROP
COLUMN
IF
EXISTS
mode
;
ALTER
TABLE
custom_fields
DROP
COLUMN
IF
EXISTS
mode
;
DROP
TYPE
IF
EXISTS
custom_fields_modes
;
DROP
TYPE
IF
EXISTS
custom_fields_modes
;
CREATE
TYPE
custom_fields_modes
AS
ENUM
(
'form'
,
'technical'
);
CREATE
TYPE
custom_fields_modes
AS
ENUM
(
'form'
,
'technical'
);
ALTER
TABLE
custom_fields
ADD
COLUMN
mode
custom_fields_modes
DEFAULT
'form'
;
ALTER
TABLE
custom_fields
ADD
COLUMN
mode
custom_fields_modes
NOT
NULL
DEFAULT
'form'
;
/* RE CREATE VIEWS */
/* RE CREATE VIEWS */
CREATE
OR
REPLACE
VIEW
res_view_letterbox
AS
CREATE
OR
REPLACE
VIEW
res_view_letterbox
AS
...
...
This diff is collapsed.
Click to expand it.
sql/structure.sql
+
3
−
0
View file @
f041ab73
...
@@ -1314,11 +1314,14 @@ CONSTRAINT acknowledgement_receipts_pkey PRIMARY KEY (id)
...
@@ -1314,11 +1314,14 @@ CONSTRAINT acknowledgement_receipts_pkey PRIMARY KEY (id)
)
)
WITH
(
OIDS
=
FALSE
);
WITH
(
OIDS
=
FALSE
);
CREATE
TYPE
custom_fields_modes
AS
ENUM
(
'form'
,
'technical'
);
CREATE
TABLE
custom_fields
CREATE
TABLE
custom_fields
(
(
id
serial
NOT
NULL
,
id
serial
NOT
NULL
,
label
character
varying
(
256
)
NOT
NULL
,
label
character
varying
(
256
)
NOT
NULL
,
type
character
varying
(
256
)
NOT
NULL
,
type
character
varying
(
256
)
NOT
NULL
,
mode
custom_fields_modes
NOT
NULL
DEFAULT
'form'
,
values
jsonb
,
values
jsonb
,
CONSTRAINT
custom_fields_pkey
PRIMARY
KEY
(
id
),
CONSTRAINT
custom_fields_pkey
PRIMARY
KEY
(
id
),
CONSTRAINT
custom_fields_unique_key
UNIQUE
(
label
)
CONSTRAINT
custom_fields_unique_key
UNIQUE
(
label
)
...
...
This diff is collapsed.
Click to expand it.
test/unitTests/app/customField/CustomFieldControllerTest.php
+
3
−
0
View file @
f041ab73
...
@@ -24,6 +24,7 @@ class CustomFieldControllerTest extends TestCase
...
@@ -24,6 +24,7 @@ class CustomFieldControllerTest extends TestCase
$args
=
[
$args
=
[
'label'
=>
'mon custom'
,
'label'
=>
'mon custom'
,
'type'
=>
'select'
,
'type'
=>
'select'
,
'mode'
=>
'form'
,
'values'
=>
[
'one'
,
'two'
]
'values'
=>
[
'one'
,
'two'
]
];
];
$fullRequest
=
\httpRequestCustom
::
addContentInBody
(
$args
,
$request
);
$fullRequest
=
\httpRequestCustom
::
addContentInBody
(
$args
,
$request
);
...
@@ -43,6 +44,7 @@ class CustomFieldControllerTest extends TestCase
...
@@ -43,6 +44,7 @@ class CustomFieldControllerTest extends TestCase
$args
=
[
$args
=
[
'label'
=>
'mon custom'
,
'label'
=>
'mon custom'
,
'type'
=>
'select'
,
'type'
=>
'select'
,
'mode'
=>
'form'
,
'values'
=>
[
'one'
,
'two'
]
'values'
=>
[
'one'
,
'two'
]
];
];
$fullRequest
=
\httpRequestCustom
::
addContentInBody
(
$args
,
$request
);
$fullRequest
=
\httpRequestCustom
::
addContentInBody
(
$args
,
$request
);
...
@@ -76,6 +78,7 @@ class CustomFieldControllerTest extends TestCase
...
@@ -76,6 +78,7 @@ class CustomFieldControllerTest extends TestCase
$args
=
[
$args
=
[
'label'
=>
'mon custom22'
,
'label'
=>
'mon custom22'
,
'mode'
=>
'form'
,
'values'
=>
[
'one'
,
'two'
,
'trois'
]
'values'
=>
[
'one'
,
'two'
,
'trois'
]
];
];
$fullRequest
=
\httpRequestCustom
::
addContentInBody
(
$args
,
$request
);
$fullRequest
=
\httpRequestCustom
::
addContentInBody
(
$args
,
$request
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment