From 618ca05c9f02a1323f165bd315a840d522fad4a1 Mon Sep 17 00:00:00 2001
From: Patrick Barroca <pbarroca@afi-sa.fr>
Date: Wed, 10 Oct 2018 17:48:55 +0200
Subject: [PATCH] hotline #80455 : fix novelty format label

---
 VERSIONS_HOTLINE/80455                                      | 1 +
 .../modules/cosmo/controllers/DataProfileControllerTest.php | 6 ++++++
 library/Class/IntProfilDonnees.php                          | 2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)
 create mode 100644 VERSIONS_HOTLINE/80455

diff --git a/VERSIONS_HOTLINE/80455 b/VERSIONS_HOTLINE/80455
new file mode 100644
index 00000000000..f3db7c52f44
--- /dev/null
+++ b/VERSIONS_HOTLINE/80455
@@ -0,0 +1 @@
+ - ticket #80455 : Cosmogramme : correction d'un libellé de format de date de nouveauté
\ No newline at end of file
diff --git a/cosmogramme/cosmozend/tests/application/modules/cosmo/controllers/DataProfileControllerTest.php b/cosmogramme/cosmozend/tests/application/modules/cosmo/controllers/DataProfileControllerTest.php
index b386b05112b..b1c7897270f 100644
--- a/cosmogramme/cosmozend/tests/application/modules/cosmo/controllers/DataProfileControllerTest.php
+++ b/cosmogramme/cosmozend/tests/application/modules/cosmo/controllers/DataProfileControllerTest.php
@@ -256,6 +256,12 @@ class Cosmo_DataProfileControllerEditUnimarcKohaTest extends Cosmo_DataProfileCo
   }
 
 
+  /** @test */
+  public function nouveauteFormatAAAAMMJJShouldExists() {
+    $this->assertXPathContentContains('//select[@id="nouveaute_format"]/option', 'AAAAMMJJ');
+  }
+
+
   /** @test */
   public function multiInputNouveauteValeursShouldBePresent() {
     $this->assertXPath('//form//div[@id="multi_inputs_nouveaute_valeurs"]');
diff --git a/library/Class/IntProfilDonnees.php b/library/Class/IntProfilDonnees.php
index 1922cf6731d..161307b1d54 100644
--- a/library/Class/IntProfilDonnees.php
+++ b/library/Class/IntProfilDonnees.php
@@ -193,7 +193,7 @@ class IntProfilDonneesLoader extends Storm_Model_Loader {
   public function getDateFormats() {
     return [Class_IntProfilDonnees::NOVELTY_DATE_FORMAT_NONE => '',
             Class_IntProfilDonnees::NOVELTY_DATE_FORMAT_AAAA_MM_JJ => 'AAAA-MM-JJ',
-            Class_IntProfilDonnees::NOVELTY_DATE_FORMAT_AAAAMMJJ => 'AAAMMJJ',
+            Class_IntProfilDonnees::NOVELTY_DATE_FORMAT_AAAAMMJJ => 'AAAAMMJJ',
             Class_IntProfilDonnees::NOVELTY_DATE_FORMAT_VALUES => $this->_('Valeur(s)'),
             Class_IntProfilDonnees::NOVELTY_DATE_FORMAT_JJ_MM_AAAA => 'JJ-MM-AAAA',
             Class_IntProfilDonnees::NOVELTY_DATE_FORMAT_SLASHED_JMAAAA => 'J/M/AAAA'];
-- 
GitLab