def check_linked_values(app, need, needs, result, search_option, search_value, filter_string=None, one_hit=False):
links = need["<STR_LIT>"]<EOL>if not isinstance(search_value, list):<EOL><INDENT>search_value = [search_value]<EOL><DEDENT>for link in links:<EOL><INDENT>if filter_string is not None:<EOL><INDENT>try:<EOL><INDENT>if not filter_single_need(needs[link], filter_string):<EOL><INDENT>continue<EOL><DEDENT><DEDENT>except Exception as e:<EOL><INDENT>logger.warning("<STR_LIT>".format(filter_string, e))<EOL><DEDENT><DEDENT>if not one_hit and not needs[link][search_option] in search_value:<EOL><INDENT>return None<EOL><DEDENT>elif one_hit and needs[link][search_option] in search_value:<EOL><INDENT>return result<EOL><DEDENT><DEDENT>return result<EOL>
Returns a specific value, if for all linked needs a given option has a given value.

The linked needs can be filtered by using the ``filter`` option.

If ``one_hit`` is set to True, only one linked need must have a positive match for the searched value.

**Examples**

**Needs used as input data**

.. code-block:: jinja

    .. req:: Input A
       :id: clv_A
       :status: in progress

    .. req:: Input B
       :id: clv_B
       :status: in progress

    .. spec:: Input C
       :id: clv_C
       :status: closed

.. req:: Input A
   :id: clv_A
   :status: in progress
   :collapse: False

.. req:: Input B
   :id: clv_B
   :status: in progress
   :collapse: False

.. spec:: Input C
   :id: clv_C
   :status: closed
   :collapse: False


**Example 1: Positive check**

Status gets set to *progress*.

.. code-block:: jinja

    .. spec:: result 1: Positive check
       :links: clv_A, clv_B
       :status: [[check_linked_values('progress', 'status', 'in progress' )]]

.. spec:: result 1: Positive check
   :id: clv_1
   :links: clv_A, clv_B
   :status: [[check_linked_values('progress', 'status', 'in progress' )]]
   :collapse: False


**Example 2: Negative check**

Status gets not set to *progress*, because status of linked need *clv_C* does not match *"in progress"*.

.. code-block:: jinja

    .. spec:: result 2: Negative check
       :links: clv_A, clv_B, clv_C
       :status: [[check_linked_values('progress', 'status', 'in progress' )]]

.. spec:: result 2: Negative check
   :id: clv_2
   :links: clv_A, clv_B, clv_C
   :status: [[check_linked_values('progress', 'status', 'in progress' )]]
   :collapse: False


**Example 3: Positive check thanks of used filter**

status gets set to *progress*, because linked need *clv_C* is not part of the filter.

.. code-block:: jinja

    .. spec:: result 3: Positive check thanks of used filter
       :links: clv_A, clv_B, clv_C
       :status: [[check_linked_values('progress', 'status', 'in progress', 'type == "req" ' )]]

.. spec:: result 3: Positive check thanks of used filter
   :id: clv_3
   :links: clv_A, clv_B, clv_C
   :status: [[check_linked_values('progress', 'status', 'in progress', 'type == "req" ' )]]
   :collapse: False

**Example 4: Positive check thanks of one_hit option**

Even *clv_C* has not the searched status, status gets anyway set to *progress*.
That's because ``one_hit`` is used so that only one linked need must have the searched
value.

.. code-block:: jinja

    .. spec:: result 4: Positive check thanks of one_hit option
       :links: clv_A, clv_B, clv_C
       :status: [[check_linked_values('progress', 'status', 'in progress', one_hit=True )]]

.. spec:: result 4: Positive check thanks of one_hit option
   :id: clv_4
   :links: clv_A, clv_B, clv_C
   :status: [[check_linked_values('progress', 'status', 'in progress', one_hit=True )]]
   :collapse: False

**Result 5: Two checks and a joint status**
Two checks are performed and both are positive. So their results get joined.

.. code-block:: jinja

    .. spec:: result 5: Two checks and a joint status
       :links: clv_A, clv_B, clv_C
       :status: [[check_linked_values('progress', 'status', 'in progress', one_hit=True )]] [[check_linked_values('closed', 'status', 'closed', one_hit=True )]]

.. spec:: result 5: Two checks and a joint status
   :id: clv_5
   :links: clv_A, clv_B, clv_C
   :status: [[check_linked_values('progress', 'status', 'in progress', one_hit=True )]] [[check_linked_values('closed', 'status', 'closed', one_hit=True )]]
   :collapse: False

:param result: value, which gets returned if all linked needs have parsed the checks
:param search_option: option name, which is used n linked needs for the search
:param search_value: value, which an option of a linked need must match
:param filter_string: Checks are only performed on linked needs, which pass the defined filter
:param one_hit: If True, only one linked need must have a positive check
:return: result, if all checks are positive