Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong generation of note user updated when note is updated #39

Open
MayamaTakeshi opened this issue May 6, 2023 · 2 comments
Open

Wrong generation of note user updated when note is updated #39

MayamaTakeshi opened this issue May 6, 2023 · 2 comments

Comments

@MayamaTakeshi
Copy link
Owner

If user2 updates a note from user1, we were generating a journal update event with the href of user1.
This is incorrect as the updater must show up if present.

@MayamaTakeshi
Copy link
Owner Author

Checking again, edited notes show up like this after page reload:

Updated by [Redmine Admin](http://192.168.225.201:3000/users/1) [21 minutes](http://192.168.225.201:3000/projects/mindcryme/activity?from=2023-05-06) ago Private · Edited

The 'Edited' responds to hover and shows the date of the modification and the author.
See a full journal div below:

<div id="change-2264" class="journal has-notes private-notes">
    <div id="note-8" class="note">
    <div class="contextual">
      <span class="journal-actions"><span class="journal-2264-heart heart-link-with-count"><a class="icon icon-heart-off" data-remote="true" rel="nofollow" data-method="post" href="/hearts/heart?object_id=2264&amp;object_type=journal"><span class="heart-link-label">Like</span></a><a class="heart-count-number" href="/hearts/hearted_users?object_id=2264&amp;object_type=journal">0</a></span><a title="Quote" class="icon-only icon-comment" data-remote="true" rel="nofollow" data-method="post" href="/issues/44/quoted?journal_id=2264&amp;journal_indice=8">Quote</a> <a title="Edit" class="icon-only icon-edit" data-remote="true" data-method="get" href="/journals/2264/edit">Edit</a><span class="drdn"><span class="drdn-trigger"><span class="icon-only icon-actions" title="Actions">Actions</span></span><div class="drdn-content"><div class="drdn-items"><a href="#" onclick="copyTextToClipboard(this);; return false;" class="icon icon-copy-link" data-clipboard-text="http://192.168.225.201:3000/issues/44#note-8">Copy link</a> <a data-confirm="Are you sure?" class="icon icon-del" data-remote="true" rel="nofollow" data-method="put" href="/journals/2264?journal%5Bnotes%5D=">Delete</a></div></div></span></span>
      <a href="#note-8" class="journal-link">#8</a>
    </div>
    <h4 class="note-header">
      
      Updated by <a class="user active" href="/users/7">takeshi mayama</a> <a title="05/06/2023 05:02 PM" href="/projects/mindcryme/activity?from=2023-05-06">21 minutes</a> ago
      <span id="journal-2264-private_notes" class="badge badge-private private">Private</span>
      <span title="05/06/2023 05:22 PM by takeshi mayama" class="update-info">· Edited</span>
    </h4>

    <div id="journal-2264-notes" class="wiki"><p>fff ggg</p></div>
    </div>
  </div>

So we might need to modify the journal partial to include the name of 'editor' and also include data-editor attribute with its login name so that it can be compared as the name in loggedas:

<div id="loggedas">Logged in as <a class="user active" href="[/users/7](http://192.168.225.201:3000/users/7)">mayama</a></div> 

@MayamaTakeshi MayamaTakeshi reopened this May 6, 2023
@MayamaTakeshi
Copy link
Owner Author

The change in 2ca9c6c was undone by c7d883f as journal.updated_by seems to not be available in redmine4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant