update includer timestamps when includee edited

Ticket

+commit
 

 

When A+B is edited, bump the updated date of A, if A+B is included anywhere in A in the references table. (So that A appears in Recent Changes.)

May have unintended consequences, so please code reversibly.

 

Feature: Update Includer cards
  In order for Notifications to be more user friendly
  Users should be notified when transcluded plus cards of a card they are watching change.

  Background:
    Given I log in as Joe User
    And I create Cardtype card "Book" with content ""
    And I create Book card "Ulysses" with content "by , design by "
    And Joe Camel is watching "Ulysses"
    And Joe Admin is watching "Book"
 
  Scenario: Watcher should be notified of updates to transcluded plus card
    When I create card "Ulysses+author" with content "James Joyce"
    Then Joe Camel should be notified that "Joe User updated "Ulysses""
    And Joe Admin should be notified that "Joe User updated "Ulysses""
    When I edit "Ulysses+author" setting content to "Jim"
    Then Joe Camel should be notified that "Joe User updated "Ulysses""
    And Joe Admin should be notified that "Joe User updated "Ulysses""
    
  Scenario: Should not notify of transcluded but not plussed card
    When I create card "illustrator" with content "Picasso"
    Then No notification should be sent                                     
    
  Scenario: Should not notify of plussed but not transcluded card
    When I create card "Ulysses+random" with content "boo"
    Then No notification should be sent

  Scenario: Templated cards should only send one email when added or updated
    Given I create card "Book+*tform" with content "by , design by "
    When I create Book card "Bros Krmzv" with plusses:
      |author|illustrator|
      |Dostoyevsky|Delacroix|      
    Then Joe Admin should be notified that "Joe User added "Bros Krmzv""
    When I edit "Bros Krmzv" with plusses:
      |author|illustrator|
      |Rumi|Monet|
    Then Joe Admin should be notified that "Joe User updated "Bros Krmzv""

  Scenario: Watching a plus card on multiedit; and watching both plus card and including card on multiedit
    Given I create Cardtype card "Fruit"
    And I create card "Fruit+*tform" with content " "
    And I create Fruit card "Banana" with plusses:
      |color|flavor|
      |yellow|sweet|
    And Joe Camel is watching "Banana+color"
    When I edit "Banana" with plusses:
      |color|flavor|
      |spotted|mushy|
    Then Joe Camel should be notified that "Joe User edited "Banana+color""    
    When Joe Camel is watching "Banana"
    And I edit "Banana" with plusses:
      |color|flavor|
      |spotted|mushy|
    Then Joe Camel should be notified that "Joe User updated "Banana""
    
  Scenario: Watching a plus card & including card on regular edit
    When I create card "Ulysses+author" with content "Joyce"
    Then Joe Camel should be notified that "Joe User updated "Ulysses""
    When Joe Camel is watching "Ulysses+author"
    And I edit "Ulysses+author" setting content to "Jim"
    Then Joe Camel should be notified that "Joe User updated "Ulysses""
      

 

my first reaction is that this should probably only affect relative inclusions...  Otherwise we might really drown recent changes with edits to a  commonly transcluded card.


how do we know if an inclusion is relative? it would need to be recorded in the reference. (currently is not)

  --Lewis Hoffman.....Fri Jul 10 11:12:52 -0700 2009


convo w/ Ethan, we can do just cards included by trunk. this will be the same as relative in most cases but doesn't require new tracking. FTW!

  --Lewis Hoffman.....Tue Jul 28 09:42:23 -0700 2009


 


This is done for notifications. Bailing on recent changes for now.

  --Lewis Hoffman.....Tue Aug 04 12:50:32 -0700 2009


Cool, it works!

 

At least one issue with it -- the email tells me who last changed the including card and its last-changed date, rather than that giving info for the included card that actually changed.

  --John Abbe.....Wed Aug 05 08:10:40 -0700 2009


And, should i ticket doing this for RC? And is the intent then to bump the date as described in +solution, or...?

  --John Abbe.....Wed Aug 05 08:10:55 -0700 2009


For multi-edit, suggest changing:

This update included the following changes: edited defusion+visuals edited defusion+list

 

To:

This update included the following changes:

edited defusion+visuals

edited defusion+list

 

  --John Abbe.....Wed Aug 05 08:17:29 -0700 2009


(Note to self: Make sure to check references to this card when splitting the ticket; most probably refer to Recent Changes.)

  --John Abbe.....Fri Aug 21 13:27:02 -0700 2009


is the email still giving incorrect info? If so we should make a ticket for that.

 

As for the RC, I think this is difficult enough that we'll probably only get to it when there is a charge for seriously cleaning up search results. not sure it's worth ticketing until then.

  --Ethan McCutchen.....Mon Oct 18 16:00:11 -0700 2010


Emails have the new format suggested here, but are still giving the wrong editor. (The date was removed, which is fine.)

 

Would like to add a note about RC somewhere, but not clear enough about what you mean by "seriously cleaning up search results" to now if there's a likely ticket or idea on Search+tickets for item or CQL+tickets for item

  --John Abbe.....Sun Feb 13 23:26:11 -0800 2011


Er, my tagging assumed that the "in progress" meant this was targetted for 1.11?

  --John Abbe.....2013-03-21 23:53:21 +0000


nah, I think this has been "in progress" since 2009. resetting.

  --Ethan McCutchen.....2013-03-22 03:14:43 +0000


Note, we do want certain plus cards to show up in recent in some cases (eg analysis cards on wikirate.org)

--Ethan McCutchen.....2013-04-10 17:23:08 +0000

This should really be "field descendants", not includers.

--Ethan McCutchen.....2014-08-17 03:10:57 +0000