> For the complete documentation index, see [llms.txt](https://giswater.gitbook.io/change-log/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://giswater.gitbook.io/change-log/3.5.031.md).

# 3.5.031

## INDEX

* [#inventory](#inventory "mention")
  * [#deep-refactor-on-links-to-enhance-usability-and-performance](#deep-refactor-on-links-to-enhance-usability-and-performance "mention")
  * [#new-fields-on-review-tables](#new-fields-on-review-tables "mention")
  * [#improve-address-search-returning-values-even-if-writing-mismatch](#improve-address-search-returning-values-even-if-writing-mismatch "mention")
  * [#new-fields-on-inventory-tables](#new-fields-on-inventory-tables "mention")
  * [#allow-basic-info-editable](#allow-basic-info-editable "mention")
* [#om](#om "mention")
  * [#new-funcional-mapzone-for-ud-drainzone](#new-funcional-mapzone-for-ud-drainzone "mention")
* [#epa](#epa "mention")
  * [#new-function-gw\_fct\_epa2data-ws-that-copies-results-from-epa-to-data-form](#new-function-gw_fct_epa2data-ws-that-copies-results-from-epa-to-data-form "mention")
* [#masterplan](#masterplan "mention")
  * [#allow-different-execution-modes-for-psector](#allow-different-execution-modes-for-psector "mention")
  * [#add-button-toggle-active-and-checkbox-show-inactive-on-psector-manager-form](#add-button-toggle-active-and-checkbox-show-inactive-on-psector-manager-form "mention")

## INVENTORY

### <mark style="color:blue;">Deep refactor on links to enhance usability and performance</mark>

#### Links are now Giswater advanced objects

They have now similar capabilities as node, arc and connec does.

* Use **Giswater info button** to get the form and edit data
* Insert new link using Edit toolbar **Insert arc tool** (it's still possible to insert using QGIS regular tools)

<figure><img src="https://78444640-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3OfYgdaTSD51CRsy2UO6%2Fuploads%2FPHSYVkj5jPTcljOgK9c2%2Fimage.png?alt=media&amp;token=5708e9c8-251f-45ad-bca6-daac887dbd2b" alt=""><figcaption></figcaption></figure>

#### Advanced use of links on planified state

There are several ways to manage connections and their links when they are in a planified state.

**For each connection with State=1 in the psector, a new link will be created in the database**. There are two possible scenarios:

* Connection in **Plannified** state - It will have 1 link in Plannified state.
* Connection in **In Service** state - It will have 2 links, 1 in In Service state (which will be displayed without the psector), 1 in the Planified state (which will be displayed with the psector).

This second case serves to change the way of connection using the psector. To do it you have to:

1. Add the desired connections to the psector **Relations.**
2. Change the **geometry** of the link or its **arc\_id**. It can be done in several ways:&#x20;

   1. **Manually edit the link** with the usual QGIS tools. In case the connection point is in a different section, the arc\_id will be changed automatically.
   2. Use the **Set arc\_id** tool from the connections tab of the psector. On the selected rows you can establish which section you want to connect to. The connection point can be established as the closest place of the selected section (*Set closest point*) or the exact place where the section has been clicked (*Set user click*).

   <figure><img src="https://78444640-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3OfYgdaTSD51CRsy2UO6%2Fuploads%2FV3lEZi4erxLr48qKzRfq%2Fimage.png?alt=media&amp;token=6988cc8d-3c0f-44f0-b3dd-d70dcc13da8a" alt=""><figcaption></figcaption></figure>

### <mark style="color:blue;">New fields on review tables</mark>

Some new fields have been added to **review tables** in order to allow revision of more accurate data. New available fields are:

* Field\_date: date of the revision(WS and UD)
* Steps pp: to indicate the number of polypropylene steps (for manhole UD)
* Steps fe: to indicate the number of iron steps (for manhole UD)
* Steps replace: to indicate if some steps needs to be replaced (for manhole UD)
* Cover: to indicate cover state (for manhole UD)

### <mark style="color:blue;">Improve address search returning values even if writing mismatch</mark>

The address search now is capable of returning values even if writing mismatch any value on the street table. It will show similar values.

This is posible using Postgres extension called fuzzystrmatch. It will be automatically installed when the Giswater update is done.

<figure><img src="https://78444640-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3OfYgdaTSD51CRsy2UO6%2Fuploads%2FSmkAbITTRjVSBgIrZ7lm%2Fimage.png?alt=media&amp;token=4dfb6cec-1f94-4af5-b484-cd619bfb145b" alt=""><figcaption></figcaption></figure>

### <mark style="color:blue;">New fields on inventory tables</mark>

Some new fields have been added to inventroy tables:

* **om\_state**: Establish operational state of the element (added for **node, arc, connec** WS)
* **conserv\_state**: Establish conservation state of the element (added for **node, arc, connec** WS)
* **priority**: To set priority value of the element (added for **connec** WS)
* **valve\_location**: To set where the valve of the connec is located. For example: Garden, Parking, Ditch, Locker... (added for **connec** WS)
* **valve\_type**: To set the type of the valve related to a connec. For example: Ball, Gate, Butterfly... (added for **connec** WS)
* **shutoff\_valve**: Establish whether the connec has shutoff valve or not (added for **connec** WS)
* **access\_type**: Establish how to acces to the element (added for **connec, node** WS)
* **placement\_type**: If the element is located within another element, this field can be used to set exactly where it is placed. For example: Register, Facility, Stand... (added for **connec, node** WS)
* **crmzone\_id**: Related to which crm zone the connec belongs to (added for **connec** WS)
* **valve\_type**: To set the additional type of the valve, unlinked from the catalog (added for **valve** WS)
* **wjoin\_type**: To set the additional type of the water join, unlinked from the catalog. For example: Domestic, Industrial, Irrigation, Fire... (added for **water join** WS)
* **greentap\_type**: To set the additional type of the greentap, unlinked from the catalog (added for **greentap** WS)
* **cat\_valve**: To set the catalog of the valve related to greentap (added for **greentap** WS)
* **hydrant\_type**: To set the additional type of the hydrant, unlinked from the catalog (added for **hydrant** WS)

### <mark style="color:blue;">Allow basic info editable</mark>

For those elements of the project that can be clicked using Giswater's info tool and return a basic form, an edition button is now available.&#x20;

<figure><img src="https://78444640-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3OfYgdaTSD51CRsy2UO6%2Fuploads%2FdxakFUHZgW7ETFyE7qwz%2Fimage.png?alt=media&amp;token=9ec930fe-479c-4eb0-886e-2eafc1b71357" alt=""><figcaption></figcaption></figure>

## OM

### <mark style="color:blue;">New funcional mapzone for UD: Drainzone</mark>

Drainzone is the first functional mapzone to be used on urban drainage projects. It will automatically sectorizate different zones given the OUTFALLS of the network, creating, as a result, the reach of every DRAINZONE.

Configuration is very similar to existing mapzones on WS projects:

* Set ***true*** on *config\_param\_system* the variable for *utils\_graphanalytics\_status.*
* Configure a new drainzone for every existing OUTFALL. On table ***drainzone***, set a *name*, *descript*, *expl\_id* and *graphconfig* (unlinke WS mapzones, here it must be only configured the *nodeParent* key).

Here is an example for *graphconfig* field (240 is the node\_id of and outfall):

```json
{"use":[{"nodeParent":"240"}], "ignore":[], "forceClosed":[]}
```

Having the correct configuration, you can open Giswater's Toolbox and find the function to run the **Mapzones analysis**. On WS projects it is located on Master section, but drainzone is considerated an operational process, so it is located on **OM section**.

<figure><img src="https://78444640-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3OfYgdaTSD51CRsy2UO6%2Fuploads%2FUE2Rkn68fDWjuNAfs1lq%2Fimage.png?alt=media&amp;token=a4f7e785-6ff0-4bb4-8de6-8baee4b69adb" alt=""><figcaption></figcaption></figure>

As a result of the function:

* **Geometry** of every drainzone on the current exploitation is **updated** (depending on the mapzone constructor method).
* **Field&#x20;*****drainzone\_id*** for every node, arc, connec and gully is set to its given drainzone.

{% hint style="info" %}
If you don't check Commit changes variable, the results won't be automatically applied, giving the chance to firstly consult the results on a temporary table via SQL query. Once you have the desired results, then check Commit changes.
{% endhint %}

<figure><img src="https://78444640-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3OfYgdaTSD51CRsy2UO6%2Fuploads%2FrfZaxYKiiazlVRwyc7g4%2Fimage.png?alt=media&amp;token=e8b9c5ff-af7d-4837-8b18-a70bf41a6cd2" alt=""><figcaption></figcaption></figure>

## EPA

### <mark style="color:blue;">New function gw\_fct\_epa2data (WS) that copies results from EPA to data form</mark>

Now is possible to get some values of an **EPA result** and **merge them with inventory tables**, allowing users to consult these data on the main form of the element. Until now, these values were only available on the EPA tables of the data model.

To do so a new function have to be executed:

{% code overflow="wrap" %}

```plsql
SELECT gw_fct_epa2data($${"client":{"device":4, "infoType":1, "lang":"ES", "epsg":25831}, "data":{"resultId":"your_result_name_here"}}$$);
```

{% endcode %}

It could also be configured to run easily using the Giswater's Toolbox.

The result of the execution will be seen on the form of the elements.&#x20;

For nodes the available data is related to **demand**, **pression** and **head**.

For arcs the available data is **related** to **flow** and **velocity**.

For connecs the avaiable data is related to **pression**.

{% hint style="info" %}
These EPA related data will be stored in new tables of the DB called node\_add, arc\_add and connec\_add. If the function is ran again with another EPA result, the values of these tables will be overwrited.
{% endhint %}

<figure><img src="https://78444640-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3OfYgdaTSD51CRsy2UO6%2Fuploads%2FDjI4JsTRr8YUpGbRVVtt%2Fimage.png?alt=media&amp;token=c8c40f1f-892e-4725-992f-eece2eb30949" alt=""><figcaption></figcaption></figure>

## MASTERPLAN

### <mark style="color:blue;">Allow different execution modes for psector</mark>

The capacity of executing a psector were available in lower versions, but there was a variable to decide which execution mode you want to use.

Now all the developed modes have been merged and they are all available without using any variable.&#x20;

As a result, if the status of the psector is modified, depending on the value that is established, **certain changes can be executed automatically**.

The available states are the following:

* PLANNED - For planned psectors. It is the most common as the initial state of a psector.
* IN PROGRESS - When a psector is running. Your change does not run any automatic processes.
* EXECUTED - For executed psectors. There are 3 subtypes:
  * *Do nothing*: It only changes the state but does not execute any automatic process.
  * *Obsolete*: The elements that were planned will go to the **OBSOLETE state** but it will be indicated by their type of state that they were previously planned elements. For example, the **status type** could be **PLANNED DONE** (status type names are fully configurable).
  * *On Service*: The elements that **were planified** will become **IN SERVICE state**. The elements that **were planned to be removed** from the psector will become **OBSOLETE state**. A copy of the psector will be generated to keep track of what you had planned.
* CANCELED - When a psector is cancelled. The elements that were planned will go to the **OBSOLETE state** but it will be indicated by their type of state that they were previously planned elements. For example the **status type** could be **PLANNIFIED CANCELED**.

### <mark style="color:blue;">Add button "Toggle active" and checkbox "Show inactive" on psector manager form</mark>

A new button have been added on the Relations tab of psector form. The aim of the button is to make easier to change the state or the doable value of some relations.

When using psectors in an advanced way, in some occasions it is needed to change the value of these two fields. Using the new button users can select multiple rows and then toggle value of all of them.

<figure><img src="https://78444640-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3OfYgdaTSD51CRsy2UO6%2Fuploads%2FUfRtTxfmjOYJ8dJR2JOM%2Fimage.png?alt=media&amp;token=686fa79d-e95f-4016-bcc3-e44c60010791" alt=""><figcaption></figcaption></figure>
