View Issue Details

IDProjectCategoryView StatusLast Update
0008725mantisbtapi soappublic2008-01-10 10:23
Reportermwietscher Assigned To 
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionno change required 
Product Version1.1.0 
Target Version1.1.1 
Summary0008725: Notes are duplicated when updating bug
Description

when you update an existing bug using mc_issue_update, then the existing notes are duplicating.

even if you send tns__issuedata without attaching the existing notes, mantisconnect inserts the old notes again.

So after updating a bug with 2 notes 4 times, you have 32 notes...

Tagsnotes, soap api, update

Activities

planser

planser

2008-01-10 08:14

reporter   ~0016620

I'm not able to reproduce this issue. I tried the following in Java:

public void test8725() {
try {
IssueData issue = portType.mc_issue_get(user, pwd, BigInteger.valueOf(1)); // soap1.txt
assertEquals(1, issue.getNotes().length);
issue.setAdditional_information("This is additional information");
issue.setNotes(null); // this has to be done
portType.mc_issue_update(user, pwd, issue.getId(), issue); // soap2.txt
issue = portType.mc_issue_get(user, pwd, BigInteger.valueOf(1)); // soap3.txt
assertEquals(1, issue.getNotes().length);
} catch (RemoteException e) {
fail(e.getMessage());
}
}

The issue initially has one note. soap1.txt contains the following (response):

[...]
<notes xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:IssueNoteData[1]">
<item xsi:type="tns:IssueNoteData">
<id xsi:type="xsd:integer">22</id>
<reporter xsi:type="tns:AccountData">
<id xsi:type="xsd:integer">1</id>
<name xsi:type="xsd:string">administrator</name>
<email xsi:type="xsd:string">root@localhost</email>
</reporter>
<text xsi:type="xsd:string">This is a test note.</text>
<view_state xsi:type="tns:ObjectRef">
<id xsi:type="xsd:integer">10</id>
<name xsi:type="xsd:string">public</name>
</view_state>
<date_submitted xsi:type="xsd:dateTime">2008-01-10T13:52:23Z</date_submitted>
<last_modified xsi:type="xsd:dateTime">2008-01-10T13:52:23Z</last_modified>
</item>
</notes>
[...]

The updated issue in soap2.txt has no notes set (request):

[...]
<notes xsi:type="ns2:IssueNoteData" xsi:nil="true"/>
[...]

And finally the updated issue (response):

[...]
<notes xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:IssueNoteData[1]">
<item xsi:type="tns:IssueNoteData">
<id xsi:type="xsd:integer">22</id>
<reporter xsi:type="tns:AccountData">
<id xsi:type="xsd:integer">1</id>
<name xsi:type="xsd:string">administrator</name>
<email xsi:type="xsd:string">root@localhost</email>
</reporter>
<text xsi:type="xsd:string">This is a test note.</text>
<view_state xsi:type="tns:ObjectRef">
<id xsi:type="xsd:integer">10</id>
<name xsi:type="xsd:string">public</name>
</view_state>
<date_submitted xsi:type="xsd:dateTime">2008-01-10T13:52:23Z</date_submitted>
<last_modified xsi:type="xsd:dateTime">2008-01-10T13:52:23Z</last_modified>
</item>
</notes>
[...]

mwietscher

mwietscher

2008-01-10 09:05

reporter   ~0016621

i am sorry, you are right... it was a problem in my client application...

please close this issue...