Ticket #2020 (closed bug)

Opened 16 years ago

Last modified 15 years ago

Comment frames do not show what was commented

Reported by: deyan Owned by: kyli
Priority: major Milestone: M12_RELEASE
Component: uncategorized Version: 2.0
Keywords: Cc:
Category: unknown Effort:
Importance: Ticket_group:
Estimated Number of Hours: 0 Add Hours to Ticket: 0
Billable?: yes Total Hours: 0
Analysis_owners: deyan Design_owners: kyli
Imp._owners: kyli Test_owners:
Analysis_reviewers: kyli Changelog:
Design_reviewers: meddle Imp._reviewers: meddle, meddle
Test_reviewers: Analysis_score: 4.5
Design_score: 4.5 Imp._score: 4.5
Test_score: 0

Description

Create a book, insert a comment frame, open preview mode and add some comments. Save and reload the book, the comments in the frame are not displayed (but they should)

Change History

comment:1 Changed 16 years ago by deyan

  • Status changed from new to s1b_analysis_finished

comment:2 Changed 15 years ago by kyli

  • Design_owners set to kyli
  • Status changed from s1b_analysis_finished to s2a_design_started

comment:3 Changed 15 years ago by kyli

  • Status changed from s2a_design_started to s2b_design_finished

The problem is that every resource frame in a book has relative refs to its main resource. So, when a book is copied (on opening preview), the main resource is also copied.. and comment stream changes are not affecting the original book. There are other problems closely related to this one - the reader does not have the ability to persist anything, so changes to fileSystem books could not be persisted. The things are not so with the server - then you open a server book with the reader, it synchronizes its resources, so all changes are sent to the server. But this is generally not desired, since changes caused from links are also sent to the server. So, the bugfix consists of the following steps:

  • Make AppViewUtil.openBook() open a copy of the real book if the edition is SDI one. This is the method called from the reader to open a new book.. So, the resulting behaviour will be the same as with the preview mode in author edition - changes made to the copy do not affect the original book.
  • In the SDI case of openBook and in the logic, opening book preview, fire event which signifies that the book is being copied. This event will be handled by the CommentLogic, so that it will know about the source bookView and the bookView of the copied book. It will find all CommentFrameView`s in them and set the relative refs to absolute ones. This way, the comment streams wll still be copied, but the frames will work with the original streams. In the server case, the original comment stream will continue synchronizing with the server and only changes to it will be sent. In the author (preview mode) case, the copied frames will work with the original streams, so changes will be visible after preview closing.

comment:4 Changed 15 years ago by kyli

  • Status changed from s2b_design_finished to s2c_design_ok

comment:5 Changed 15 years ago by kyli

  • Owner set to kyli
  • Status changed from s2c_design_ok to s3a_implementation_started

comment:6 Changed 15 years ago by kyli

  • Status changed from s3a_implementation_started to s3b_implementation_finished
  • Imp._owners set to kyli

After a discussion, we decided not to persist books originating from file system in the reader. An appropriate message is popped up.

comment:7 Changed 15 years ago by kyli

Forgot to link the branch.

comment:8 Changed 15 years ago by meddle

  • Status changed from s3b_implementation_finished to s2c_design_ok
  • Analysis_reviewers set to kyli
  • Analysis_score changed from 0 to 2.5
  • Imp._reviewers set to meddle
  • Design_score changed from 0 to 2.5
  • Design_reviewers set to meddle
  • Imp._score changed from 0 to 2.5

Notes:

  • Problems when merging, bad branch...
  • I think that kind of fix needs tests!
  • When you open a saved to file book in the Author that contains comment frames and you click preview, you see the message like in the reader, but then you can modify the comment frame and the modifications go to the real book, then when you click to save the real book on the 'save' item from the file menu, you've got an Assertation Error...

So I'll fail this fix, but your code will go to the trunk, because it adds new functionality, I'll delete your bad branch. You can try to fix the Assertation Error branching the trunk in a clean branch again, your code will be in the trunk...

Put in trunk at [7486].

2.5p (40m)

comment:9 Changed 15 years ago by kyli

  • Status changed from s2c_design_ok to s3a_implementation_started

comment:10 Changed 15 years ago by kyli

  • Status changed from s3a_implementation_started to s3b_implementation_finished

comment:11 Changed 15 years ago by meddle

  • Status changed from s3b_implementation_finished to s3c_implementation_ok
  • Design_score changed from 2.5 to 4.5
  • Imp._reviewers changed from meddle to meddle, meddle
  • Imp._score changed from 2.5 to 4.5
  • Analysis_score changed from 2.5 to 4.5

And now... fixed in [7611]...

I'm sorry I had to lose your time but at the end the fix is working perfectly!

4.5p (20m)

comment:12 Changed 15 years ago by deyan

  • Status changed from s3c_implementation_ok to closed

Batch update from file query-10.csv

Note: See TracTickets for help on using tickets.