Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c8e704cb
Commit
c8e704cb
authored
Aug 13, 2020
by
Donald Cook
Committed by
Mayra Cabrera
Aug 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added description markdown field to iteration
parent
19240517
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
33 additions
and
21 deletions
+33
-21
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+5
-0
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+14
-0
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+1
-0
ee/app/assets/javascripts/iterations/components/iteration_report.vue
...ts/javascripts/iterations/components/iteration_report.vue
+7
-1
ee/app/assets/javascripts/iterations/index.js
ee/app/assets/javascripts/iterations/index.js
+2
-1
ee/app/assets/javascripts/iterations/queries/group_iteration.query.graphql
...ascripts/iterations/queries/group_iteration.query.graphql
+1
-0
ee/app/graphql/types/iteration_type.rb
ee/app/graphql/types/iteration_type.rb
+1
-0
ee/spec/frontend/iterations/components/iteration_report_spec.js
...c/frontend/iterations/components/iteration_report_spec.js
+2
-19
No files found.
doc/api/graphql/reference/gitlab_schema.graphql
View file @
c8e704cb
...
...
@@ -7644,6 +7644,11 @@ type Iteration {
"""
description
:
String
"""
The
GitLab
Flavored
Markdown
rendering
of
`
description
`
"""
descriptionHtml
:
String
"""
Timestamp
of
the
iteration
due
date
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
c8e704cb
...
...
@@ -21042,6 +21042,20 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "descriptionHtml",
"description": "The GitLab Flavored Markdown rendering of `description`",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "dueDate",
"description": "Timestamp of the iteration due date",
doc/api/graphql/reference/index.md
View file @
c8e704cb
...
...
@@ -1152,6 +1152,7 @@ Represents an iteration object.
| --- | ---- | ---------- |
|
`createdAt`
| Time! | Timestamp of iteration creation |
|
`description`
| String | Description of the iteration |
|
`descriptionHtml`
| String | The GitLab Flavored Markdown rendering of
`description`
|
|
`dueDate`
| Time | Timestamp of the iteration due date |
|
`id`
| ID! | ID of the iteration |
|
`iid`
| ID! | Internal ID of the iteration |
...
...
ee/app/assets/javascripts/iterations/components/iteration_report.vue
View file @
c8e704cb
...
...
@@ -69,6 +69,11 @@ export default {
required
:
false
,
default
:
false
,
},
previewMarkdownPath
:
{
type
:
String
,
required
:
false
,
default
:
''
,
},
},
data
()
{
return
{
...
...
@@ -126,6 +131,7 @@ export default {
:group-path=
"fullPath"
:is-editing=
"true"
:iteration=
"iteration"
:preview-markdown-path=
"previewMarkdownPath"
@
updated=
"isEditing = false"
@
cancel=
"isEditing = false"
/>
...
...
@@ -157,7 +163,7 @@ export default {
</gl-new-dropdown>
</div>
<h3
ref=
"title"
class=
"page-title"
>
{{ iteration.title }}
</h3>
<div
ref=
"description"
v-
text=
"iteration.description
"
></div>
<div
ref=
"description"
v-
html=
"iteration.descriptionHtml
"
></div>
<iteration-report-summary
:group-path=
"fullPath"
:iteration-id=
"iteration.id"
/>
<iteration-report-tabs
:group-path=
"fullPath"
:iteration-id=
"iteration.id"
/>
</template>
...
...
ee/app/assets/javascripts/iterations/index.js
View file @
c8e704cb
...
...
@@ -52,7 +52,7 @@ export function initIterationForm() {
export
function
initIterationReport
()
{
const
el
=
document
.
querySelector
(
'
.js-iteration
'
);
const
{
fullPath
,
iterationIid
,
editIterationPath
}
=
el
.
dataset
;
const
{
fullPath
,
iterationIid
,
editIterationPath
,
previewMarkdownPath
}
=
el
.
dataset
;
const
canEdit
=
parseBoolean
(
el
.
dataset
.
canEdit
);
return
new
Vue
({
...
...
@@ -65,6 +65,7 @@ export function initIterationReport() {
iterationIid
,
canEdit
,
editIterationPath
,
previewMarkdownPath
,
},
});
},
...
...
ee/app/assets/javascripts/iterations/queries/group_iteration.query.graphql
View file @
c8e704cb
...
...
@@ -7,6 +7,7 @@ query GroupIteration($groupPath: ID!, $iid: ID!) {
iid
id
description
descriptionHtml
webPath
startDate
dueDate
...
...
ee/app/graphql/types/iteration_type.rb
View file @
c8e704cb
...
...
@@ -20,6 +20,7 @@ module Types
field
:description
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
'Description of the iteration'
markdown_field
:description_html
,
null:
true
field
:state
,
Types
::
IterationStateEnum
,
null:
false
,
description:
'State of the iteration'
...
...
ee/spec/frontend/iterations/components/iteration_report_spec.js
View file @
c8e704cb
...
...
@@ -59,7 +59,7 @@ describe('Iterations tabs', () => {
const
iteration
=
{
title
:
'
June week 1
'
,
id
:
'
gid://gitlab/Iteration/2
'
,
description
:
'
The first week of June
'
,
description
Html
:
'
The first week of June
'
,
startDate
:
'
2020-06-02
'
,
dueDate
:
'
2020-06-08
'
,
};
...
...
@@ -89,24 +89,7 @@ describe('Iterations tabs', () => {
it
(
'
shows title and description
'
,
()
=>
{
expect
(
findTitle
().
text
()).
toContain
(
iteration
.
title
);
expect
(
findDescription
().
text
()).
toContain
(
iteration
.
description
);
});
it
(
'
escapes html in description
'
,
async
()
=>
{
wrapper
.
setData
({
namespace
:
{
iteration
:
{
...
iteration
,
description
:
`<img src=x onerror=alert(document.domain)>`
,
},
},
});
await
wrapper
.
vm
.
$nextTick
();
expect
(
findDescription
().
html
()).
toEqual
(
'
<div><img src=x onerror=alert(document.domain)></div>
'
,
);
expect
(
findDescription
().
text
()).
toContain
(
iteration
.
descriptionHtml
);
});
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment