<?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>317905</bug_id>
          
          <creation_ts>2013-04-05 23:59:01 +0000</creation_ts>
          <short_desc>Adding entries from data sources mixes allowed values for fields</short_desc>
          <delta_ts>2013-04-06 00:04:56 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>tellico</product>
          <component>general</component>
          <version>2.3.7</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Robby Stephenson">robby</reporter>
          <assigned_to name="Robby Stephenson">robby</assigned_to>
          
          
          <cf_commitlink>http://commits.kde.org/tellico/becfff9e6fca7862ca40e5254697867962c0368c</cf_commitlink>
          <cf_versionfixedin>2.3.8</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1357848</commentid>
    <comment_count>0</comment_count>
    <who name="Robby Stephenson">robby</who>
    <bug_when>2013-04-05 23:59:01 +0000</bug_when>
    <thetext>http://forum.kde.org/viewtopic.php?f=200&amp;t=110654&amp;sid=2fd5be67c37c5ffaa318386fb5323ec7

For Choice fields with allowed values, adding entries from data sources will reset the allowed values to include all default values and not retain ordering.

Reproducible: Always</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1357849</commentid>
    <comment_count>1</comment_count>
    <who name="Robby Stephenson">robby</who>
    <bug_when>2013-04-06 00:04:56 +0000</bug_when>
    <thetext>Git commit becfff9e6fca7862ca40e5254697867962c0368c by Robby Stephenson.
Committed on 06/04/2013 at 02:00.
Pushed by rstephenson into branch &apos;2.3&apos;.

Don&apos;t reset the list of allowed values when adding new entries

Adding entries from data sources called Kernel:mergeFields() which
used a QSet to merge allowed values. The result is that all the default
values are always added back, and the ordering is not retained.

Move Kernel::mergeFields to Document::mergeFields and retain the
existing list of allowed values, appending new values _if necessary_.

Add a unit test.
FIXED-IN: 2.3.8

M  +4    -0    ChangeLog
M  +1    -1    src/commands/updateentries.cpp
M  +43   -0    src/document.cpp
M  +5    -0    src/document.h
M  +1    -34   src/tellico_kernel.cpp
M  +0    -6    src/tellico_kernel.h
M  +33   -0    src/tests/collectiontest.cpp
M  +1    -0    src/tests/collectiontest.h

http://commits.kde.org/tellico/becfff9e6fca7862ca40e5254697867962c0368c</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>