Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
4d9d99b5
Commit
4d9d99b5
authored
Jun 25, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
project spreadsheet to be able to take the same info for all the rows of the project
parent
30bed7ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
dream/plugins/CapacityStations/CapacityProjectSpreadsheet.py
dream/plugins/CapacityStations/CapacityProjectSpreadsheet.py
+5
-2
No files found.
dream/plugins/CapacityStations/CapacityProjectSpreadsheet.py
View file @
4d9d99b5
...
...
@@ -20,9 +20,11 @@ class CapacityProjectSpreadsheet(plugin.InputPreparationPlugin):
node
=
data
[
'graph'
][
'node'
]
now
=
strptime
(
data
[
'general'
][
'currentDate'
],
'%Y/%m/%d'
)
if
projectData
:
alreadyConsideredProjects
=
[]
for
row
in
range
(
1
,
len
(
projectData
)):
if
projectData
[
row
][
0
]:
if
projectData
[
row
][
0
]
and
not
(
projectData
[
row
][
0
]
in
alreadyConsideredProjects
)
:
projectId
=
projectData
[
row
][
0
]
alreadyConsideredProjects
.
append
(
projectData
[
row
][
0
])
orderDate
=
strptime
(
projectData
[
row
][
1
],
'%Y/%m/%d'
)
orderDate
=
(
orderDate
-
now
).
days
if
projectData
[
row
][
2
]:
...
...
@@ -37,7 +39,8 @@ class CapacityProjectSpreadsheet(plugin.InputPreparationPlugin):
# get the number of operations of the project
numberOfOperations
=
1
i
=
1
while
not
projectData
[
row
+
i
][
0
]:
# if the id changes or is empty it means there is no more data on the project
while
(
not
projectData
[
row
+
i
][
0
])
or
(
projectData
[
row
+
i
][
0
]
==
projectId
):
# if a completely empty line is found break
if
all
(
v
in
[
None
,
''
]
for
v
in
projectData
[
row
+
i
]):
break
...
...
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