Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
6f274b8a
Commit
6f274b8a
authored
Jul 06, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 577037: Make convert-workflow convert statuses in order, so that
IN_PROGRESS doesn't end up before CONFIRMED. r=LpSolit, a=LpSolit
parent
b0b2c098
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
convert-workflow.pl
contrib/convert-workflow.pl
+11
-6
No files found.
contrib/convert-workflow.pl
View file @
6f274b8a
...
@@ -54,16 +54,21 @@ END
...
@@ -54,16 +54,21 @@ END
getc
;
getc
;
my
$dbh
=
Bugzilla
->
dbh
;
my
$dbh
=
Bugzilla
->
dbh
;
my
%
translation
=
(
# This is an array instead of a hash so that we can be sure that
NEW
=>
'CONFIRMED'
,
# the translation happens in the right order. In particular, we
ASSIGNED
=>
'IN_PROGRESS'
,
# want NEW to be renamed to CONFIRMED, instead of having REOPENED
REOPENED
=>
'CONFIRMED'
,
# be the one that gets renamed.
CLOSED
=>
'VERIFIED'
,
my
@translation
=
(
[
NEW
=>
'CONFIRMED'
],
[
ASSIGNED
=>
'IN_PROGRESS'
],
[
REOPENED
=>
'CONFIRMED'
],
[
CLOSED
=>
'VERIFIED'
],
);
);
my
$status_field
=
Bugzilla::
Field
->
check
(
'bug_status'
);
my
$status_field
=
Bugzilla::
Field
->
check
(
'bug_status'
);
$dbh
->
bz_start_transaction
();
$dbh
->
bz_start_transaction
();
while
(
my
(
$from
,
$to
)
=
each
%
translation
)
{
foreach
my
$pair
(
@translation
)
{
my
(
$from
,
$to
)
=
@$pair
;
print
"Converting $from to $to...\n"
;
print
"Converting $from to $to...\n"
;
$dbh
->
do
(
'UPDATE bugs SET bug_status = ? WHERE bug_status = ?'
,
$dbh
->
do
(
'UPDATE bugs SET bug_status = ? WHERE bug_status = ?'
,
undef
,
$to
,
$from
);
undef
,
$to
,
$from
);
...
...
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