Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
maarchRM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
maarchRM
Merge requests
!792
Feat/24620 journal 24h
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Feat/24620 journal 24h
feat/24620_journal_24h
into
develop
Overview
0
Commits
27
Pipelines
1
Changes
1
Merged
Jerome Boucher
requested to merge
feat/24620_journal_24h
into
develop
1 year ago
Overview
0
Commits
27
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Viewing commit
a69d58da
Prev
Next
Show latest version
1 file
+
16
−
7
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Verified
a69d58da
fix errors
· a69d58da
Cyril Vazquez
authored
1 year ago
src/bundle/lifeCycle/Controller/journal.php
+
16
−
7
Options
@@ -904,8 +904,12 @@ class journal
$fromDate
=
$previousJournal
->
toDate
;
}
else
{
$previousJournalId
=
null
;
$firstEvent
=
$this
->
sdoFactory
->
find
(
'lifeCycle/event'
,
null
,
null
,
"<eventDate"
,
0
,
1
);
$fromDate
=
$firstEvent
->
eventDate
;
$firstEvents
=
$this
->
sdoFactory
->
find
(
'lifeCycle/event'
,
null
,
null
,
"<timestamp"
,
0
,
1
);
if
(
count
(
$firstEvents
))
{
$fromDate
=
$firstEvents
[
0
]
->
timestamp
;
}
else
{
return
[];
}
}
// End date is now, will be lowered to start of current second
@@ -928,7 +932,7 @@ class journal
$minDate
=
$startTime
,
$maxDate
=
$endTime
,
$org
=
$ownerOrgRegNumber
,
$sortBy
=
"
>
timestamp"
,
$sortBy
=
"
<
timestamp"
,
$maxResults
=
null
);
@@ -1014,15 +1018,15 @@ class journal
return
$this
->
logController
->
archiveJournal
(
$journalFilename
,
$journal
,
$timestampFileName
);
}
protected
function
getPreviousJournalEvent
(
$journal
,
$previousJournal
)
protected
function
getPreviousJournalEvent
(
$journal
,
$previousJournal
=
null
)
{
// First event : chain with previous journal
$eventLine
=
array
();
$eventLine
[
0
]
=
(
string
)
$
newJ
ournal
->
archiveId
;
$eventLine
[
0
]
=
(
string
)
$
j
ournal
->
archiveId
;
$eventLine
[
1
]
=
"lifeCycle/chainJournal"
;
$eventLine
[
2
]
=
(
string
)
$
newJ
ournal
->
fromDate
;
$eventLine
[
3
]
=
(
string
)
$
newJ
ournal
->
toDate
;
$eventLine
[
2
]
=
(
string
)
$
j
ournal
->
fromDate
;
$eventLine
[
3
]
=
(
string
)
$
j
ournal
->
toDate
;
$eventLine
[
4
]
=
$eventLine
[
5
]
=
$eventLine
[
6
]
=
$eventLine
[
7
]
=
""
;
// Write previous journal informations
@@ -1054,6 +1058,11 @@ class journal
$event
->
eventInfo
=
json_decode
(
$event
->
eventInfo
);
if
(
is_array
(
$event
->
eventInfo
))
{
foreach
(
$event
->
eventInfo
as
$i
=>
$val
)
{
if
(
!
is_scalar
(
$val
))
{
$event
->
eventInfo
[
$i
]
=
""
;
}
}
$eventLine
=
array_merge
(
$eventLine
,
$event
->
eventInfo
);
}
Loading