Skip to content

Commit

Permalink
Merge pull request #422 from OPUS4/4.7.0.6
Browse files Browse the repository at this point in the history
Patch-Release 4.7.0.6
  • Loading branch information
j3nsch authored Sep 28, 2021
2 parents afeddfe + 4a6cea4 commit f60599f
Show file tree
Hide file tree
Showing 14 changed files with 221 additions and 65 deletions.
15 changes: 15 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@

---

## Release 4.7.0.6 - 2021-09-28

### Bugs

* [OPUSVIER-4562] - "Freischalten" überschreibt "PublishedDate" mit aktuellem Datum
* [OPUSVIER-3981] - Persönlicher Name eines Verfassers ist in XMetaDissPlus bisher nicht möglich
* [#420] - Fehler bei XMetaDissPlus-Ausgabe bei Personen ohne Vornamen
* [#424] - Tests, die von UI-Sprache abhängen fixen

### Aufgaben

* [#418] - Automatische Tests mit GitHub Actions auf Ubuntu 20 umstellen

---

## Release 4.7.0.5 - 2021-08-17

### Bugs
Expand Down
29 changes: 28 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
# OPUS 4 Release Notes

## Release 4.7.0.5 2020-08-17
## Release 4.7.0.6 2021-09-28

Dieser Patch Release behebt Problem bei XMetaDissPlus und beim
Freischalten von Dokumenten im Review-Modul.

### Personen ohne Vornamen in XMetaDissPlus

AutorInnen ohne Vornamen werden in XMetaDissPlus nun mit dem Element
`pc:personEnteredUnderGivenName` abgebildet. Der Nachname kann damit
auch für Künstlernamen verwendet werden, die keinen Vornamen haben.

```
<pc:name type="otherName">
<pc:personEnteredUnderGivenName>
NACHNAME
</pc:personEnteredUnderGivenName>
</pc:name>
```

### `PublishedDate` beim Freischalten von Dokumenten

Beim Freischalten von Dokumenten im Review-Modul, also nicht beim
Freischalten eines einzelnen Dokuments in der Administration, wurde
bisher immer das Feld `PublishedDate` auf das aktuelle Datum gesetzt.
Mit der neuen Version werden existierende Einträge in dem Feld nicht
mehr überschrieben.

## Release 4.7.0.5 2021-08-17

Dieser Patch Release behebt zwei kleinere Bugs. Das Editieren der Inhalte der
Impressum und Kontakt-Seite ist nun auch von der FAQ-Seite aus ohne Probleme beim
Expand Down
2 changes: 1 addition & 1 deletion application/configs/application.ini
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ name = 'OPUS 4'
logoLink = home
security = 1
workspacePath = APPLICATION_PATH "/workspace"
version = 4.7.0.5
version = 4.7.0.6
update.latestVersionCheckUrl = "https://api.github.com/repos/opus4/application/releases/latest"
; base URL of your OPUS instance (used for generating absolute URLs, e.g. in email messages)
url = 'https://web.example.org/opus'
Expand Down
6 changes: 4 additions & 2 deletions bin/install-database.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ mysqlRoot() {

mysqlRoot <<LimitString
CREATE DATABASE IF NOT EXISTS $DBNAME DEFAULT CHARACTER SET = UTF8MB4 DEFAULT COLLATE = UTF8MB4_UNICODE_CI;
GRANT ALL PRIVILEGES ON $DBNAME.* TO '$DB_ADMIN'@'$MYSQLHOST' IDENTIFIED BY '$DB_ADMIN_PASSWORD';
GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$DB_USER'@'$MYSQLHOST' IDENTIFIED BY '$DB_USER_PASSWORD';
CREATE USER '$DB_ADMIN'@'$MYSQLHOST' IDENTIFIED BY '$DB_ADMIN_PASSWORD';
GRANT ALL PRIVILEGES ON $DBNAME.* TO '$DB_ADMIN'@'$MYSQLHOST';
CREATE USER '$DB_USER'@'$MYSQLHOST' IDENTIFIED BY '$DB_USER_PASSWORD';
GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$DB_USER'@'$MYSQLHOST';
FLUSH PRIVILEGES;
LimitString

Expand Down
2 changes: 1 addition & 1 deletion bin/install_mysql_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ sudo service mysql start

# Create DB and user -> have to be in one line
export MYSQL_PWD=root \
&& mysql --default-character-set=utf8 -h 'localhost' -P '3306' -u 'root' -v -e "CREATE DATABASE IF NOT EXISTS opusdb DEFAULT CHARACTER SET = UTF8 DEFAULT COLLATE = UTF8_GENERAL_CI; GRANT ALL PRIVILEGES ON opusdb.* TO 'opus4'@'localhost' IDENTIFIED BY 'root'; GRANT SELECT,INSERT,UPDATE,DELETE ON opusdb.* TO 'opus4admin'@'localhost' IDENTIFIED BY 'root'; FLUSH PRIVILEGES;"
&& mysql --default-character-set=utf8 -h 'localhost' -P '3306' -u 'root' -v -e "CREATE DATABASE IF NOT EXISTS opusdb DEFAULT CHARACTER SET = UTF8 DEFAULT COLLATE = UTF8_GENERAL_CI; CREATE USER 'opus4admin'@'localhost' IDENTIFIED BY 'root'; GRANT ALL PRIVILEGES ON opusdb.* TO 'opus4admin'@'localhost'; CREATE USER 'opus4'@'localhost' IDENTIFIED BY 'root'; GRANT SELECT,INSERT,UPDATE,DELETE ON opusdb.* TO 'opus4'@'localhost'; FLUSH PRIVILEGES;"
132 changes: 84 additions & 48 deletions modules/oai/views/scripts/index/prefixes/XMetaDissPlus.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -287,22 +287,31 @@

<xsl:template match="PersonAuthor" mode="xmetadissplus">
<dc:creator xsi:type="pc:MetaPers">
<pc:person>
<pc:name type="nameUsedByThePerson">
<xsl:if test="normalize-space(@FirstName)">
<pc:foreName>
<xsl:value-of select="@FirstName" />
</pc:foreName>
</xsl:if>
<pc:surName>
<xsl:value-of select="@LastName" />
</pc:surName>
</pc:name>
<xsl:if test="normalize-space(@AcademicTitle)">
<pc:person>
<xsl:choose>
<xsl:when test="normalize-space(@FirstName) != '' and normalize-space(@LastName) != ''">
<pc:name type="nameUsedByThePerson">
<pc:foreName>
<xsl:value-of select="@FirstName" />
</pc:foreName>
<pc:surName>
<xsl:value-of select="@LastName" />
</pc:surName>
</pc:name>
</xsl:when>
<xsl:otherwise>
<pc:name type="otherName">
<pc:personEnteredUnderGivenName>
<xsl:value-of select="@LastName" />
</pc:personEnteredUnderGivenName>
</pc:name>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="normalize-space(@AcademicTitle)">
<pc:academicTitle>
<xsl:value-of select="@AcademicTitle" />
</pc:academicTitle>
</xsl:if>
</xsl:if>
</pc:person>
</dc:creator>
</xsl:template>
Expand Down Expand Up @@ -361,38 +370,56 @@
<xsl:template match="PersonAdvisor" mode="xmetadissplus">
<dc:contributor xsi:type="pc:Contributor" type="dcterms:ISO3166" thesis:role="advisor">
<pc:person>
<pc:name type="nameUsedByThePerson">
<xsl:if test="normalize-space(@FirstName)">
<pc:foreName>
<xsl:value-of select="@FirstName" />
</pc:foreName>
</xsl:if>
<pc:surName>
<xsl:value-of select="@LastName" />
</pc:surName>
</pc:name>
<xsl:if test="normalize-space(@AcademicTitle)">
<pc:academicTitle>
<xsl:value-of select="@AcademicTitle" />
</pc:academicTitle>
</xsl:if>
<xsl:choose>
<xsl:when test="normalize-space(@FirstName) != '' and normalize-space(@LastName) != ''">
<pc:name type="nameUsedByThePerson">
<pc:foreName>
<xsl:value-of select="@FirstName" />
</pc:foreName>
<pc:surName>
<xsl:value-of select="@LastName" />
</pc:surName>
</pc:name>
</xsl:when>
<xsl:otherwise>
<pc:name type="otherName">
<pc:personEnteredUnderGivenName>
<xsl:value-of select="@LastName" />
</pc:personEnteredUnderGivenName>
</pc:name>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="normalize-space(@AcademicTitle)">
<pc:academicTitle>
<xsl:value-of select="@AcademicTitle" />
</pc:academicTitle>
</xsl:if>
</pc:person>
</dc:contributor>
</xsl:template>

<xsl:template match="PersonReferee" mode="xmetadissplus">
<dc:contributor xsi:type="pc:Contributor" type="dcterms:ISO3166" thesis:role="referee">
<pc:person>
<pc:name type="nameUsedByThePerson">
<xsl:if test="normalize-space(@FirstName)">
<pc:foreName>
<xsl:value-of select="@FirstName" />
</pc:foreName>
</xsl:if>
<pc:surName>
<xsl:value-of select="@LastName" />
</pc:surName>
</pc:name>
<xsl:choose>
<xsl:when test="normalize-space(@FirstName) != '' and normalize-space(@LastName) != ''">
<pc:name type="nameUsedByThePerson">
<pc:foreName>
<xsl:value-of select="@FirstName" />
</pc:foreName>
<pc:surName>
<xsl:value-of select="@LastName" />
</pc:surName>
</pc:name>
</xsl:when>
<xsl:otherwise>
<pc:name type="otherName">
<pc:personEnteredUnderGivenName>
<xsl:value-of select="@LastName" />
</pc:personEnteredUnderGivenName>
</pc:name>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="normalize-space(@AcademicTitle)">
<pc:academicTitle>
<xsl:value-of select="@AcademicTitle" />
Expand All @@ -405,16 +432,25 @@
<xsl:template match="PersonEditor" mode="xmetadissplus">
<dc:contributor xsi:type="pc:Contributor" type="dcterms:ISO3166" thesis:role="editor">
<pc:person>
<pc:name type="nameUsedByThePerson">
<xsl:if test="normalize-space(@FirstName)">
<pc:foreName>
<xsl:value-of select="@FirstName" />
</pc:foreName>
</xsl:if>
<pc:surName>
<xsl:value-of select="@LastName" />
</pc:surName>
</pc:name>
<xsl:choose>
<xsl:when test="normalize-space(@FirstName) != '' and normalize-space(@LastName) != ''">
<pc:name type="nameUsedByThePerson">
<pc:foreName>
<xsl:value-of select="@FirstName" />
</pc:foreName>
<pc:surName>
<xsl:value-of select="@LastName" />
</pc:surName>
</pc:name>
</xsl:when>
<xsl:otherwise>
<pc:name type="otherName">
<pc:personEnteredUnderGivenName>
<xsl:value-of select="@LastName" />
</pc:personEnteredUnderGivenName>
</pc:name>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="normalize-space(@AcademicTitle)">
<pc:academicTitle>
<xsl:value-of select="@AcademicTitle" />
Expand Down
10 changes: 7 additions & 3 deletions modules/review/models/ClearDocumentsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@
* @package Module_Review
* @author Thoralf Klein <[email protected]>
* @author Jens Schwidder <[email protected]>
* @copyright Copyright (c) 2008-2011, OPUS 4 development team
* @copyright Copyright (c) 2008-2021, OPUS 4 development team
* @license http://www.gnu.org/licenses/gpl.html General Public License
* @version $Id$
*/

/**
Expand Down Expand Up @@ -60,7 +59,12 @@ public function clear(array $docIds = null, $userId = null, $person = null)
$date = new Opus_Date();
$date->setNow();
$document->setServerDatePublished($date);
$document->setPublishedDate($date);

// Only set PublishedDate, if it is empty (the field is used in various ways)
$publishedDate = $document->getPublishedDate();
if ($publishedDate === null) {
$document->setPublishedDate($date);
}

$guestRole = Opus_UserRole::fetchByName('guest');
foreach ($document->getFile() as $file) {
Expand Down
2 changes: 2 additions & 0 deletions tests/library/Application/Form/Element/PositionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public function setUp()
];
$this->_staticViewHelper = 'viewFormSelect';
parent::setUp();

$this->useEnglish();
}

public function testOptions()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @copyright Copyright (c) 2019, OPUS 4 development team
* @license http://www.gnu.org/licenses/gpl.html General Public License
*/
class Application_View_Helper_Form_TranslationTest extends ControllerTestCase
class Application_View_Helper_FormTranslationTest extends ControllerTestCase
{

protected $additionalResources = ['view', 'translation'];
Expand All @@ -47,6 +47,8 @@ public function testRenderingMinimal()

public function testRenderingOptions()
{
$this->useEnglish();

$helper = new Application_View_Helper_FormTranslation();
$helper->setView(Zend_Registry::get('Opus_View'));

Expand Down
4 changes: 3 additions & 1 deletion tests/library/Application/View/Helper/ResultTitleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
class Application_View_Helper_ResultTitleTest extends ControllerTestCase
{

protected $additionalResources = ['database', 'view'];
protected $additionalResources = ['database', 'view', 'translation'];

protected $helper;

Expand All @@ -45,6 +45,8 @@ public function setUp()
$this->helper = new Application_View_Helper_ResultTitle();
$view = Zend_Registry::get('Opus_View');
$this->helper->setView($view);

$this->useEnglish();
}

public function testRendering()
Expand Down
2 changes: 2 additions & 0 deletions tests/modules/admin/forms/Document/SubjectTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class Admin_Form_Document_SubjectTypeTest extends ControllerTestCase

public function testCreateForm()
{
$this->useEnglish();

$form = new Admin_Form_Document_SubjectType('swd');

$this->assertEquals(0, count($form->getSubForms()));
Expand Down
6 changes: 6 additions & 0 deletions tests/modules/export/DataCiteExportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ public function testExportOfDataCiteXmlWithUnpublishedDocNotAllowed()

public function testExportOfDataCiteXmlWithUnpublishedDocAllowedForAdmin()
{
$this->useEnglish();

$this->enableSecurity();
$config = Zend_Registry::get('Zend_Config');

Expand Down Expand Up @@ -270,6 +272,8 @@ public function testExportOfDataCiteXmlWithUnpublishedDocAllowedForAdmin()

public function testExportOfDataCiteXmlWithUnpublishedDocAllowedForNonAdminUserWithPermission()
{
$this->useEnglish();

$removeAccess = $this->addModuleAccess('export', 'docsadmin');
$this->enableSecurity();
$config = Zend_Registry::get('Zend_Config');
Expand Down Expand Up @@ -307,6 +311,8 @@ public function testExportOfDataCiteXmlWithUnpublishedDocAllowedForNonAdminUserW

public function testExportOfDataCiteXmlWithUnpublishedDocAllowedForNonAdminUserWithoutPermission()
{
$this->useEnglish();

$removeAccess = $this->addModuleAccess('export', 'collectionsadmin');
$this->enableSecurity();
$config = Zend_Registry::get('Zend_Config');
Expand Down
Loading

0 comments on commit f60599f

Please sign in to comment.