<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:16:52 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[NETCONF-1180] PUT request with insert=after cannot add last item into list</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-1180</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;When making a PUT request with `insert=after` query parameter after the last existing one, the request returns a 201 Created status. &lt;br/&gt;
&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;19228_thumb&quot; href=&quot;https://jira.opendaylight.org/secure/attachment/19228/19228_Created+2+item.png&quot; title=&quot;Created 2 item.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;19228&quot; file-preview-title=&quot;Created 2 item.png&quot;&gt;&lt;img src=&quot;https://jira.opendaylight.org/secure/thumbnail/19228/_thumb_19228.png&quot; style=&quot;border: 0px solid black&quot; role=&quot;presentation&quot;/&gt;&lt;/a&gt;&lt;/span&gt; &lt;br/&gt;
However, the newly inserted item does not appear when fetching the data.&lt;br/&gt;
&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;19227_thumb&quot; href=&quot;https://jira.opendaylight.org/secure/attachment/19227/19227_list+with+one+item.png&quot; title=&quot;list with one item.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;19227&quot; file-preview-title=&quot;list with one item.png&quot;&gt;&lt;img src=&quot;https://jira.opendaylight.org/secure/thumbnail/19227/_thumb_19227.png&quot; style=&quot;border: 0px solid black&quot; role=&quot;presentation&quot;/&gt;&lt;/a&gt;&lt;/span&gt; &lt;br/&gt;
Steps to reproduce:&lt;br/&gt;
1. Run karaf&lt;br/&gt;
2. &lt;tt&gt;feature:install odl-restconf-nb odl-netconf-model-rfc8341&lt;/tt&gt;&lt;br/&gt;
3. Use Postman collection to write few items to the list&lt;/p&gt;</description>
                <environment></environment>
        <key id="37438">NETCONF-1180</key>
            <summary>PUT request with insert=after cannot add last item into list</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <status id="10003" iconUrl="https://jira.opendaylight.org/images/icons/status_generic.gif" description="">Confirmed</status>
                    <statusCategory id="2" key="new" colorName="blue-gray"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="ojo">Oleksandr Zharov</assignee>
                                    <reporter username="yaroslav.lastivka">Yaroslav Lastivka</reporter>
                        <labels>
                            <label>pick-next</label>
                            <label>pt</label>
                    </labels>
                <created>Tue, 10 Oct 2023 06:40:56 +0000</created>
                <updated>Fri, 2 Feb 2024 15:57:47 +0000</updated>
                                                            <fixVersion>7.0.0</fixVersion>
                                    <component>netconf</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="72800" author="JIRAUSER13216" created="Wed, 15 Nov 2023 10:51:44 +0000"  >&lt;p&gt;the issue is caused by bad logic of data update, see RestconfStrategy insertWithPoint{Put,Post}&lt;/p&gt;

&lt;p&gt;insertion of a new item is performed while iterating through existing elements,&lt;br/&gt;
if the index of new item is greater then the list size (insert after last item)&lt;br/&gt;
then insert condition condition is never met and actual insert is omitted.&lt;/p&gt;

&lt;p&gt;also the update logic seems being not effective, all the list items are being&#160;&lt;br/&gt;
rewritten one by one using tx.replace(), it seems reasonable to update the data &lt;br/&gt;
via whole list replacement not item after item. At least start from affected index.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="37408">NETCONF-1163</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="37434">NETCONF-1178</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="37433">NETCONF-1177</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="19228" name="Created 2 item.png" size="55255" author="yaroslav.lastivka" created="Tue, 10 Oct 2023 06:55:31 +0000"/>
                            <attachment id="19225" name="PUT requests for Controller.postman_collection.json" size="5762" author="yaroslav.lastivka" created="Tue, 10 Oct 2023 06:45:44 +0000"/>
                            <attachment id="19227" name="list with one item.png" size="44127" author="yaroslav.lastivka" created="Tue, 10 Oct 2023 06:55:25 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i046pr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>