Skip to content

Instantly share code, notes, and snippets.

@CrossVR
Last active December 20, 2015 20:09
Show Gist options
  • Save CrossVR/6188337 to your computer and use it in GitHub Desktop.
Save CrossVR/6188337 to your computer and use it in GitHub Desktop.
Evaluation Queries
# Add new components
INSERT INTO component VALUES
('API', '', ''),
('Audio Switcher', '', ''),
('Installer', '', ''),
('Internal Filters', '', ''),
('Shaders', '', ''),
('Subtitles', '', ''),
('Translations', '', ''),
('User Interface', '', ''),
('Video Renderers', '', ''),
('Website', '', ''),
('WebUI', '', '');
# Move evaluation from component to it's own field for all open tickets
INSERT INTO ticket_custom
SELECT id, 'evaluation', 'need info' FROM ticket
WHERE component = 'Need Info' AND status <> 'closed';
INSERT INTO ticket_custom
SELECT id, 'evaluation', 'reproduced' FROM ticket
WHERE component = 'Reproduced' AND status <> 'closed';
INSERT INTO ticket_custom
SELECT id, 'evaluation', 'diagnosed' FROM ticket
WHERE component = 'Diagnosed' AND status <> 'closed';
# Change the status of all new tickets with an evaluation to 'evaluated'
UPDATE ticket
SET status = 'evaluated'
WHERE id IN (
SELECT ticket
FROM ticket_custom
WHERE name = 'evaluation' AND (status = 'new' OR status = 'reopened')
);
# Change the status of all tickets with a fix to 'reviewing'
UPDATE ticket
SET status = 'reviewing'
WHERE component = 'Fix created';
# Reset the component of all tickets with deprecated components
UPDATE ticket
SET component = 'MPC-HC'
WHERE component = 'New' OR component = 'Need Info' OR component = 'Reproduced' OR component = 'Diagnosed' OR component = 'Solved' OR component = 'Accepted, Patch welcome, we will not work on this' OR component = 'Accepted, feel free to take this one and work on it!';
# Update old components
UPDATE ticket
SET component = 'MPC-HC'
WHERE component = 'MPC_HC_CORE';
UPDATE ticket
SET component = 'User Interface'
WHERE component = 'MPC_HC_GUI';
UPDATE ticket
SET component = 'Video Renderers'
WHERE component = 'MPC_HC_VIDEO_RENDERER';
UPDATE ticket
SET component = 'Audio Switcher'
WHERE component = 'MPC_HC_AUDIO_RENDERER';
UPDATE ticket
SET component = 'Subtitles'
WHERE component = 'MPC_HC_SUBTITLE_RENDERER';
UPDATE ticket
SET component = 'Internal Filters'
WHERE component = 'MPC_HC_SPLITTER';
UPDATE ticket
SET component = 'Internal Filters'
WHERE component = 'MPC_HC_CODECS';
# Move component milestones to their own component fields and change them to placeholders
UPDATE ticket
SET component = 'Filters', milestone = NULL
WHERE milestone = 'internal_filters';
UPDATE ticket
SET component = 'Translations', milestone = NULL
WHERE milestone = 'translations';
# Remove old milestones
DELETE FROM milestone
WHERE name = 'internal_filters' OR name = 'translations';
# Remove old components
DELETE FROM component
WHERE WHERE name = 'New' OR name = 'Need Info' OR name = 'Reproduced' OR name = 'Diagnosed' OR name = 'Solved' OR name = 'Accepted, Patch welcome, we will not work on this' OR name = 'Accepted, feel free to take this one and work on it!';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment