From 3df49772d47e23f04916e13fc9f5d753c56bdc08 Mon Sep 17 00:00:00 2001 From: Ruth Cheesley Date: Tue, 16 Apr 2024 14:39:22 +0100 Subject: [PATCH 1/4] Add examples of countries and regions via JSON --- docs/contacts/custom_fields.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/contacts/custom_fields.rst b/docs/contacts/custom_fields.rst index 06d4bf98..bbd63005 100644 --- a/docs/contacts/custom_fields.rst +++ b/docs/contacts/custom_fields.rst @@ -105,3 +105,28 @@ If you configure this option, the new Custom Field becomes visible in the list o This configuration helps prevent **http** request timeouts because it handles the long-running SQL query to create the new table column as a background task. To mitigate the table lock issue, run the command only once daily when you know that most of your audience is offline. With less traffic going into Mautic, the chances of encountering a problem are lower. + +Locally defined countries and regions +************************************* + +Since Mautic 5.1 it is possible to define custom countries and regions via locally hosted JSON files. This is useful when you have a specific set of countries or regions that you want to use in your Mautic instance. You can define these in a file called ``countries.json`` or ``regions.json`` located in your defined ``upload_dir``. Example code snippets are below: + +.. code:: json + + [ + "Middle Earth", + "Fillory" +] + +.. code:: json + + { + "Middle Earth": [ + "The Shire", + "Mordor" + ], + "Fillory": [ + "Castle Whitespire", + "Ember's Tomb" + ] +} \ No newline at end of file From dd450cf20fc5692e595f86f9bac67f788bd2777e Mon Sep 17 00:00:00 2001 From: Ruth Cheesley Date: Tue, 16 Apr 2024 14:57:00 +0100 Subject: [PATCH 2/4] Vale fix --- docs/contacts/custom_fields.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/contacts/custom_fields.rst b/docs/contacts/custom_fields.rst index bbd63005..ce0e3fc6 100644 --- a/docs/contacts/custom_fields.rst +++ b/docs/contacts/custom_fields.rst @@ -109,7 +109,7 @@ To mitigate the table lock issue, run the command only once daily when you know Locally defined countries and regions ************************************* -Since Mautic 5.1 it is possible to define custom countries and regions via locally hosted JSON files. This is useful when you have a specific set of countries or regions that you want to use in your Mautic instance. You can define these in a file called ``countries.json`` or ``regions.json`` located in your defined ``upload_dir``. Example code snippets are below: +Since Mautic 5.1 it's possible to define custom countries and regions via locally hosted JSON files. This is useful when you have a specific set of countries or regions that you want to use in your Mautic instance. You can define these in a file called ``countries.json`` or ``regions.json`` located in your defined ``upload_dir``. Example code snippets are below: .. code:: json @@ -119,7 +119,7 @@ Since Mautic 5.1 it is possible to define custom countries and regions via local ] .. code:: json - + { "Middle Earth": [ "The Shire", From 6ead2207f91788b02c884f50f017b16e58442975 Mon Sep 17 00:00:00 2001 From: Ruth Cheesley Date: Tue, 16 Apr 2024 15:21:53 +0100 Subject: [PATCH 3/4] Apply suggestions from code review Co-authored-by: John Linhart --- docs/contacts/custom_fields.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/contacts/custom_fields.rst b/docs/contacts/custom_fields.rst index ce0e3fc6..5b3fdd6f 100644 --- a/docs/contacts/custom_fields.rst +++ b/docs/contacts/custom_fields.rst @@ -109,18 +109,18 @@ To mitigate the table lock issue, run the command only once daily when you know Locally defined countries and regions ************************************* -Since Mautic 5.1 it's possible to define custom countries and regions via locally hosted JSON files. This is useful when you have a specific set of countries or regions that you want to use in your Mautic instance. You can define these in a file called ``countries.json`` or ``regions.json`` located in your defined ``upload_dir``. Example code snippets are below: +Since Mautic 5.1 it's possible to define custom countries and regions via locally hosted JSON files. This is useful when you have a specific set of countries or regions that you want to use in your Mautic instance. You can define these in a file called ``countries.json`` or ``regions.json`` located in your defined ``upload_dir`` (``media/files`` by default). Example code snippets are below: .. code:: json - [ +[ "Middle Earth", "Fillory" ] .. code:: json - { +{ "Middle Earth": [ "The Shire", "Mordor" From 3db40ffddc547a13d2f8b0433fae220fdbb67839 Mon Sep 17 00:00:00 2001 From: Ruth Cheesley Date: Tue, 16 Apr 2024 14:38:59 +0000 Subject: [PATCH 4/4] =?UTF-8?q?Fix=20code=20block=20indentation=20and=20br?= =?UTF-8?q?acket=20use=20flagging=20Vale=20=F0=9F=A4=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/contacts/custom_fields.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/contacts/custom_fields.rst b/docs/contacts/custom_fields.rst index 5b3fdd6f..86d2d6d9 100644 --- a/docs/contacts/custom_fields.rst +++ b/docs/contacts/custom_fields.rst @@ -109,18 +109,18 @@ To mitigate the table lock issue, run the command only once daily when you know Locally defined countries and regions ************************************* -Since Mautic 5.1 it's possible to define custom countries and regions via locally hosted JSON files. This is useful when you have a specific set of countries or regions that you want to use in your Mautic instance. You can define these in a file called ``countries.json`` or ``regions.json`` located in your defined ``upload_dir`` (``media/files`` by default). Example code snippets are below: +Since Mautic 5.1 it's possible to define custom countries and regions via locally hosted JSON files. This is useful when you have a specific set of countries or regions that you want to use in your Mautic instance. You can define these in a file called ``countries.json`` or ``regions.json`` located in your defined ``upload_dir`` which is ``media/files`` by default. Example code snippets are below: -.. code:: json +.. code-block:: json -[ + [ "Middle Earth", "Fillory" -] - -.. code:: json + ] -{ +.. code-block:: json + + { "Middle Earth": [ "The Shire", "Mordor" @@ -129,4 +129,4 @@ Since Mautic 5.1 it's possible to define custom countries and regions via locall "Castle Whitespire", "Ember's Tomb" ] -} \ No newline at end of file + } \ No newline at end of file