<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>356166</bug_id>
          
          <creation_ts>2015-12-01 16:53:04 +0000</creation_ts>
          <short_desc>Attempts to create duplicate record in MySQL for customised report</short_desc>
          <delta_ts>2015-12-02 12:11:44 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kmymoney</product>
          <component>database</component>
          <version>4.7.2</version>
          <rep_platform>openSUSE</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>339103</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Alan Prescott">alanjprescott</reporter>
          <assigned_to name="KMyMoney Devel Mailing List">kmymoney-devel</assigned_to>
          <cc>christian-david</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1560885</commentid>
    <comment_count>0</comment_count>
    <who name="Alan Prescott">alanjprescott</who>
    <bug_when>2015-12-01 16:53:04 +0000</bug_when>
    <thetext>I tried to create a customised version of the Transactions by Category report and received the following error message ...

Failed to configure report: Error in function void MyMoneyStorageSql::writeReport(const MyMoneyReport&amp;, QSqlQuery&amp;) : writing Reports
Driver = QMYSQL, Host = zanshin, User = alan, Database = KMyMoney
Driver Error: 
Database Error No -1: 
Text:  
Error type 0
Executed: INSERT INTO kmmReportConfig (name, XML, id) VALUES (?, ?, ?);
Query error No 1062: Duplicate entry &apos;R000002&apos; for key &apos;PRIMARY&apos; QMYSQL3: Unable to execute statement
Error type 2 

I logged out and back in again and tried again but had the same error message but this time referring to &apos;R000003&apos;.

FYI kmmReportConfig currently holds records up to &apos;R000014&apos;.

This is a MySQL database version on a remote host so that my wife can also access the family accounts from her Windoze box.

Reproducible: Always

Steps to Reproduce:
1. Edit a standard report
2. Save changes
3.

Actual Results:  
Fails to save the changes and reports a duplicate key error

Expected Results:  
Create nre, customised copy of the report

MySQL version of the KMyMoney database running on a remote host.
The user &apos;alan&apos; has full privileges to the KMyMoney database</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1561059</commentid>
    <comment_count>1</comment_count>
    <who name="Christian David">christian-david</who>
    <bug_when>2015-12-02 12:11:44 +0000</bug_when>
    <thetext>I am pretty sure this issue is/will be fixed in version 4.8. Until then you may want to change to the .kmy file or use the workaround described in the comment section of Bug 339103.

*** This bug has been marked as a duplicate of bug 339103 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>