Gramps unable to create or edit notes

Bug #1320596 reported by Andrew Simpson on 2014-05-18
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gramps (Ubuntu)
Undecided
Unassigned
Trusty
Undecided
Unassigned

Bug Description

Unable to edit or create notes in Gramps (Trusty). This has worked prior to upgrading.

This is the same as Debian Bug #747318, which has been marked as fixed. I have applied the Debian patch to the Ubuntu version and the problem is fixed too.

Since the file locations are slightly different than Debian, I have produced a patch for this.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: gramps 4.0.3+dfsg-2 [modified: usr/lib/python2.7/dist-packages/gramps/gui/widgets/styledtexteditor.py]
ProcVersionSignature: Ubuntu 3.13.0-24.47-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.1
Architecture: amd64
CurrentDesktop: KDE
Date: Sun May 18 19:53:15 2014
InstallationDate: Installed on 2012-12-23 (510 days ago)
InstallationMedia: Kubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.1)
PackageArchitecture: all
SourcePackage: gramps
UpgradeStatus: Upgraded to trusty on 2014-04-25 (22 days ago)

The following is an updated text justifying the SRU:
Recommend an SRU (Stable Release Update)

[Impact]

 This bug renders Gramps unusable for Genealogists because it is critical that you can save and edit notes whilst researching family trees. This is a very important function within Gramps.

 The patch is very small, and is taken directly from the development release (Utopic) which synced it from Debian:
diff --git a/gramps/gui/widgets/styledtexteditor.py b/gramps/gui/widgets/styledtexteditor.py
18 index a1c92db..d303404 100644
19 --- a/gramps/gui/widgets/styledtexteditor.py
20 +++ b/gramps/gui/widgets/styledtexteditor.py
21 @@ -179,7 +179,8 @@ class StyledTextEditor(Gtk.TextView):
22 self.textbuffer = UndoableStyledBuffer()
23 self.textbuffer.connect('style-changed', self._on_buffer_style_changed)
24 self.textbuffer.connect('changed', self._on_buffer_changed)
25 - GObject.GObject.__init__(self, buffer=self.textbuffer)
26 + GObject.GObject.__init__(self)
27 + self.set_buffer(self.textbuffer)
28
29 st_cont = self.get_style_context()
30 col = st_cont.lookup_color('link_color')

[Test Case]

Test Case 1 - Create a new note:
1. Create a new Empty Family Tree.
2. Goto "Notes" view using the left pane.
3. Click on "+" to add a new note.
4. Type something (e.g. "blabla") into the Text Field.
5. Click "OK".
> Instead of the note being saved, you get an error message "Cannot Save Note" and can only cancel the operation.

Test Case 2 - Edit an existing note:
1. Download the example file from:
http://sourceforge.net/p/gramps/source/ci/maintenance/gramps40/~/tree/example/gramps/data.gramps
2. From the "Family Tree" Menu, import the downloaded file.
2. Goto "Notes" view using the left pane.
3. Double-Click on one of the notes
> Instead of seeing the text you saw in the preview, the note text field is empty. Typing in text is futile, when you click "OK" there is no error message, but what you added to the note is not saved and is not present in the Note View preview, only the old text.

[Regression Potential]

 * There little risk of regression because the patch is minor.

 * The fix has been tested upstream, in Debian, and in the Ubuntu Development Release (Utopic).

 * In the worst case, user data could be erased if something is wrong in this area of the code that has not been detected so far. But the users would probably prefer to have this fix anyway, as they cannot really use Gramps as intended at the moment.

[Other Info]

 * Nothing further to add.

Andrew Simpson (andrew-simpson) wrote :

The attachment "gramps.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Ross Gammon (retail-0) wrote :

Thanks Andrew for reporting this.

Actually, I think the best thing would be to sync the lastest verison from Debian. There are patches applied for some other annoying bugs in that version as well.

I will investigate how to go about it, if that route is not possible, I will go for your patch.

By the way, I have published a Gramps 4.0.4 preview/alpha in my ppa:
https://launchpad.net/~retail-0/+archive/gramps-ppa
It was produced with the agreement of the Gramps project, and includes lots of other bug fixes since 4.0.3 was released. One day when Gramps 4.0.4 is released, it will automatically upgrade over the ppa version.

Regards,

Ross

Changed in gramps (Ubuntu):
assignee: nobody → Ross Gammon (retail-0)
status: New → Confirmed
Ross Gammon (retail-0) wrote :

I would be grateful if someone with the right permission would set the importance of this bug to "High", as it renders important functionality of Gramps unusable.

Ross Gammon (retail-0) wrote :

This is the correct link to the Debian Bug quoted above:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747318

Ross Gammon (retail-0) wrote :

Confirmed that gramps 4.0.3+dfsg-3 (in future Utopic 14.10) has fixed this issue.

Changed in gramps (Ubuntu):
status: Confirmed → Fix Released
Ross Gammon (retail-0) wrote :

Recommend an SRU (Stable Release Update)

[Impact]

 This bug renders Gramps unusable for Genealogists because it is critical that you can save and edit notes whilst researching family trees. This is a very important function within Gramps.

 The patch is very small, and the bug is confirmed as fixed in the development release (Utopic):
diff --git a/gramps/gui/widgets/styledtexteditor.py b/gramps/gui/widgets/styledtexteditor.py
18 index a1c92db..d303404 100644
19 --- a/gramps/gui/widgets/styledtexteditor.py
20 +++ b/gramps/gui/widgets/styledtexteditor.py
21 @@ -179,7 +179,8 @@ class StyledTextEditor(Gtk.TextView):
22 self.textbuffer = UndoableStyledBuffer()
23 self.textbuffer.connect('style-changed', self._on_buffer_style_changed)
24 self.textbuffer.connect('changed', self._on_buffer_changed)
25 - GObject.GObject.__init__(self, buffer=self.textbuffer)
26 + GObject.GObject.__init__(self)
27 + self.set_buffer(self.textbuffer)
28
29 st_cont = self.get_style_context()
30 col = st_cont.lookup_color('link_color')

The 4.0.3+dfsg-3 version in Utopic also contains a fix that re-enables the HTML view that is not working in the current Trusty verison. This is why a "sync" is better than just applying the same patch.

[Test Case]

Test Case 1 - Create a new note:
1. Create a new Empty Family Tree.
2. Goto "Notes" view using the left pane.
3. Click on "+" to add a new note.
4. Type something (e.g. "blabla") into the Text Field.
5. Click "OK".
> Instead of the note being saved, you get an error message "Cannot Save Note" and can only cancel the operation.

Test Case 2 - Edit an existing note:
1. Download the example file from:
http://sourceforge.net/p/gramps/source/ci/maintenance/gramps40/~/tree/example/gramps/data.gramps
2. From the "Family Tree" Menu, import the downloaded file.
2. Goto "Notes" view using the left pane.
3. Double-Click on one of the notes
> Instead of seeing the text you saw in the preview, the note text field is empty. Typing in text is futile, when you click "OK" there is no error message, but what you added to the note is not saved and is not present in the Note View preview, only the old text.

[Regression Potential]

 * There little risk of regression because the patches are minor, and the underlyng libraries have not had time to change since Trusty was released.

 * The fix has been tested upstream, in Debian, and in the Ubuntu Development Release (Utopic).

 * In the worst case, user data could be erased is something is wrong in this area of the code that has not been detected so far, but the users would probably prefer to have this fix anyway as they cannot really use Gramps as intended at the moment anyway.

[Other Info]

 * Nothing further to add.

C de-Avillez (hggdh2) wrote :

Opening a Trusty task for the SRU.

Ross Gammon (retail-0) on 2014-05-19
Changed in gramps (Ubuntu Trusty):
assignee: nobody → Ross Gammon (retail-0)
Changed in gramps (Ubuntu):
assignee: Ross Gammon (retail-0) → nobody
Ross Gammon (retail-0) wrote :

This SRU is now ready for sponsorship. I have pushed the update to launchpad:
lp:~retail-0/ubuntu/trusty/gramps/bug-1320596

I am also attaching a debdiff for easy review.

Changed in gramps (Ubuntu Trusty):
assignee: Ross Gammon (retail-0) → nobody
Ross Gammon (retail-0) on 2014-05-20
Changed in gramps (Ubuntu Trusty):
status: New → Confirmed
Sebastien Bacher (seb128) wrote :

Thank you for your work. The debdiff from comment #10 doesn't seems fine for a SRU though, could you describe every logical changeset and limit the changes to the fixes needed to resolve the issue? (the current diff includes changes to e.g gbp.conf or README.Debian, that shouldn't happen in a SRU)

unsubscribing sponsors, please subscribe them back once the package is ready for another review

Ross Gammon (retail-0) on 2014-06-02
Changed in gramps (Ubuntu Trusty):
assignee: nobody → Ross Gammon (retail-0)
Ross Gammon (retail-0) wrote :

Thanks Sebastien,

I have reduced the change down to just the patch that fixes the bug preventing the editing of notes. I hope it is now suitable and that the SRU can now be sponsored. I have pushed the update to launchpad:
lp:~retail-0/ubuntu/trusty/gramps/bug-1320596

An updated debdiff is also attached.

The following is an updated text justifying the SRU:
Recommend an SRU (Stable Release Update)

[Impact]

 This bug renders Gramps unusable for Genealogists because it is critical that you can save and edit notes whilst researching family trees. This is a very important function within Gramps.

 The patch is very small, and is taken directly from the development release (Utopic) which synced it from Debian:
diff --git a/gramps/gui/widgets/styledtexteditor.py b/gramps/gui/widgets/styledtexteditor.py
18 index a1c92db..d303404 100644
19 --- a/gramps/gui/widgets/styledtexteditor.py
20 +++ b/gramps/gui/widgets/styledtexteditor.py
21 @@ -179,7 +179,8 @@ class StyledTextEditor(Gtk.TextView):
22 self.textbuffer = UndoableStyledBuffer()
23 self.textbuffer.connect('style-changed', self._on_buffer_style_changed)
24 self.textbuffer.connect('changed', self._on_buffer_changed)
25 - GObject.GObject.__init__(self, buffer=self.textbuffer)
26 + GObject.GObject.__init__(self)
27 + self.set_buffer(self.textbuffer)
28
29 st_cont = self.get_style_context()
30 col = st_cont.lookup_color('link_color')

[Test Case]

Test Case 1 - Create a new note:
1. Create a new Empty Family Tree.
2. Goto "Notes" view using the left pane.
3. Click on "+" to add a new note.
4. Type something (e.g. "blabla") into the Text Field.
5. Click "OK".
> Instead of the note being saved, you get an error message "Cannot Save Note" and can only cancel the operation.

Test Case 2 - Edit an existing note:
1. Download the example file from:
http://sourceforge.net/p/gramps/source/ci/maintenance/gramps40/~/tree/example/gramps/data.gramps
2. From the "Family Tree" Menu, import the downloaded file.
2. Goto "Notes" view using the left pane.
3. Double-Click on one of the notes
> Instead of seeing the text you saw in the preview, the note text field is empty. Typing in text is futile, when you click "OK" there is no error message, but what you added to the note is not saved and is not present in the Note View preview, only the old text.

[Regression Potential]

 * There little risk of regression because the patch is minor.

 * The fix has been tested upstream, in Debian, and in the Ubuntu Development Release (Utopic).

 * In the worst case, user data could be erased if something is wrong in this area of the code that has not been detected so far. But the users would probably prefer to have this fix anyway, as they cannot really use Gramps as intended at the moment.

[Other Info]

 * Nothing further to add.

Changed in gramps (Ubuntu Trusty):
assignee: Ross Gammon (retail-0) → nobody
Luke Yelavich (themuso) wrote :

Thanks for your work. I've uploaded the debdiff. If you could please add the impact, and test case to the main bug description as mentioned in http://wiki.ubuntu.com/StableReleaseUpdates, that would be useful to testers and much appreciated, thanks.

Ross Gammon (retail-0) wrote :

Thanks Luke.
SRU assessment copied to the main bug description.

description: updated

Hello Andrew, or anyone else affected,

Accepted gramps into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/gramps/4.0.3+dfsg-2ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in gramps (Ubuntu Trusty):
status: Confirmed → Fix Committed
tags: added: verification-needed

Verified that new package from trusty-proposed fixes the problem.

Ross Gammon (retail-0) on 2014-06-07
tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gramps - 4.0.3+dfsg-2ubuntu1

---------------
gramps (4.0.3+dfsg-2ubuntu1) trusty; urgency=medium

  * Fix bug preventing the editing of notes (LP: #1320596)
 -- Ross Gammon <email address hidden> Mon, 02 Jun 2014 20:49:49 +0200

Changed in gramps (Ubuntu Trusty):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for gramps has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.