-
-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MBS-11689: Report for pseudo-releases marked as the original tracklist (
- Loading branch information
1 parent
00e722d
commit 3e32523
Showing
5 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package MusicBrainz::Server::Report::MislinkedPseudoReleases; | ||
use Moose; | ||
|
||
with 'MusicBrainz::Server::Report::ReleaseReport', | ||
'MusicBrainz::Server::Report::FilterForEditor::ReleaseID'; | ||
|
||
sub query {<<~'EOSQL'} | ||
SELECT r.id AS release_id, | ||
row_number() OVER (ORDER BY ac.name COLLATE musicbrainz, r.name COLLATE musicbrainz) | ||
FROM release r | ||
JOIN l_release_release lrr ON r.id = lrr.entity0 | ||
JOIN link l ON l.id = lrr.link | ||
JOIN link_type lt ON l.link_type = lt.id | ||
JOIN artist_credit ac ON r.artist_credit = ac.id | ||
WHERE lt.gid = 'fc399d47-23a7-4c28-bfcf-0607a562b644' --transl(iter)ation | ||
AND r.status = 4 --pseudo-release | ||
EOSQL | ||
|
||
__PACKAGE__->meta->make_immutable; | ||
no Moose; | ||
1; | ||
|
||
=head1 COPYRIGHT AND LICENSE | ||
Copyright (C) 2021 MetaBrainz Foundation | ||
This file is part of MusicBrainz, the open internet music database, | ||
and is licensed under the GPL version 2, or (at your option) any | ||
later version: http://www.gnu.org/licenses/gpl-2.0.txt | ||
=cut |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* @flow strict-local | ||
* Copyright (C) 2021 MetaBrainz Foundation | ||
* | ||
* This file is part of MusicBrainz, the open internet music database, | ||
* and is licensed under the GPL version 2, or (at your option) any | ||
* later version: http://www.gnu.org/licenses/gpl-2.0.txt | ||
*/ | ||
|
||
import * as React from 'react'; | ||
|
||
import ReleaseList from './components/ReleaseList'; | ||
import ReportLayout from './components/ReportLayout'; | ||
import type {ReportDataT, ReportReleaseT} from './types'; | ||
|
||
const MislinkedPseudoReleases = ({ | ||
canBeFiltered, | ||
filtered, | ||
generated, | ||
items, | ||
pager, | ||
}: ReportDataT<ReportReleaseT>): React.Element<typeof ReportLayout> => ( | ||
<ReportLayout | ||
canBeFiltered={canBeFiltered} | ||
description={l( | ||
`This report shows releases with status Pseudo-Release that are | ||
marked as the original version of a translation/transliteration | ||
relationship. The pseudo-release should be the one marked as a | ||
translated/transliterated version instead. If both releases | ||
are pseudo-releases, consider linking both to an official release | ||
rather than to each other.`, | ||
)} | ||
entityType="release" | ||
filtered={filtered} | ||
generated={generated} | ||
title={l('Translated/transliterated pseudo-releases marked as original')} | ||
totalEntries={pager.total_entries} | ||
> | ||
<ReleaseList items={items} pager={pager} /> | ||
</ReportLayout> | ||
); | ||
|
||
export default MislinkedPseudoReleases; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters