Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
fd398269
Commit
fd398269
authored
Mar 16, 2018
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs_support_request_ui: use start_date as homepage filter property
parent
78356c43
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_appcache.xml
...teItem/web_page_module/gadget_supportrequest_appcache.xml
+1
-1
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_js.js
...Item/web_page_module/gadget_supportrequest_homepage_js.js
+1
-1
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequest_getSupportRequestStatisticsAsJson.py
...quest/SupportRequest_getSupportRequestStatisticsAsJson.py
+3
-2
No files found.
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_appcache.xml
View file @
fd398269
...
@@ -112,7 +112,7 @@
...
@@ -112,7 +112,7 @@
<item>
<item>
<key>
<string>
text_content
</string>
</key>
<key>
<string>
text_content
</string>
</key>
<value>
<string>
CACHE MANIFEST\n
<value>
<string>
CACHE MANIFEST\n
# v1.0.
1
\n
# v1.0.
2
\n
CACHE:\n
CACHE:\n
font-awesome/font-awesome-webfont.woff2\n
font-awesome/font-awesome-webfont.woff2\n
echarts-all.js\n
echarts-all.js\n
...
...
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_js.js
View file @
fd398269
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
begin_date
=
new
Date
(
1970
,
1
,
1
);
begin_date
=
new
Date
(
1970
,
1
,
1
);
end_date
=
days_30
;
end_date
=
days_30
;
}
}
search_criteria
=
'
( translated_simulation_state_title: "
'
+
seriesName
+
'
" AND
modification_date: >=
'
+
begin_date
.
toISOString
().
slice
(
0
,
10
)
+
'
AND modification
_date: <
'
+
end_date
.
toISOString
().
slice
(
0
,
10
)
+
'
)
'
;
search_criteria
=
'
( translated_simulation_state_title: "
'
+
seriesName
+
'
" AND
delivery.start_date: >=
'
+
begin_date
.
toISOString
().
slice
(
0
,
10
)
+
'
AND delivery.start
_date: <
'
+
end_date
.
toISOString
().
slice
(
0
,
10
)
+
'
)
'
;
}
else
{
}
else
{
// Situation 2: Search Support Request without date.
// Situation 2: Search Support Request without date.
search_criteria
=
'
( translated_simulation_state_title: "
'
+
name
+
'
")
'
;
search_criteria
=
'
( translated_simulation_state_title: "
'
+
name
+
'
")
'
;
...
...
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequest_getSupportRequestStatisticsAsJson.py
View file @
fd398269
...
@@ -14,14 +14,15 @@ date_30_midnight = DateTime(str(date_30.year()) + "-" + str(date_30.month()) + "
...
@@ -14,14 +14,15 @@ date_30_midnight = DateTime(str(date_30.year()) + "-" + str(date_30.month()) + "
support_request_list
=
portal
.
portal_catalog
(
support_request_list
=
portal
.
portal_catalog
(
portal_type
=
"Support Request"
,
portal_type
=
"Support Request"
,
select_list
=
[
'simulation_state'
,
'modification_date'
]
select_list
=
[
'simulation_state'
,
'start_date'
],
**
{
"delivery.start_date"
:
{
"query"
:
now_date
,
"range"
:
"ngt"
}}
)
)
count_by_state
=
{}
count_by_state
=
{}
count_by_date
=
{
"le2"
:
{},
"2to7"
:
{},
"7to30"
:
{},
"gt30"
:
{}}
count_by_date
=
{
"le2"
:
{},
"2to7"
:
{},
"7to30"
:
{},
"gt30"
:
{}}
for
sr
in
support_request_list
:
for
sr
in
support_request_list
:
sr_date
=
sr
.
getProperty
(
"modification_date"
)
sr_date
=
sr
.
start_date
sr_state
=
sr
.
getProperty
(
"simulation_state"
)
sr_state
=
sr
.
getProperty
(
"simulation_state"
)
if
sr_state
not
in
count_by_state
:
if
sr_state
not
in
count_by_state
:
...
...
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