Problem/Motivation

Consider this scenario: A node with a radioactivity field is unpublished by default, the field has a default value to give it an initial value. It is expected that the energy will only decay once the node is published.

Currently, it decays regardless of the published state.

Proposed resolution

Make it depending on the state. Assuming the entity extends EntityPublishedInterface

Remaining tasks

- Write a patch
- Write a test for this scenario

Comments

Sutharsan created an issue. See original summary.

sutharsan’s picture

Status: Active » Needs work
StatusFileSize
new1.08 KB

Needs work for additional test.

sutharsan’s picture

I also credited @Heine, who originally wrote this patch.

Still needs work for adding a test.

  • Sutharsan committed 46f5fb3 on 8.x-3.x
    Issue #2994104 by Sutharsan, Heine: Do not process incidents for...
sutharsan’s picture

Status: Needs work » Fixed
sutharsan’s picture

Status: Fixed » Needs work

oops, still needs tests

sutharsan’s picture

Title: Do not process incidents for unpublished entities » Do not decay incident data of unpublished entities
sutharsan’s picture

This is embarrassing, the original issue never got fixed. Energy emits are not processed, but decay still is for not-published entities.

sutharsan’s picture

Assigned: Unassigned » sutharsan
sutharsan’s picture

StatusFileSize
new7.42 KB
sutharsan’s picture

Status: Needs work » Needs review
sutharsan’s picture

Created a follow-up #3212915: Unpublished entities should not emit energy to prevent unpublished entities to emit energy.

  • Sutharsan committed 75cbc61 on 8.x-3.x
    Issue #2994104 by Sutharsan: Do not decay incident data of unpublished...
sutharsan’s picture

Status: Needs review » Fixed

  • Sutharsan committed ff629be on 4.0.x
    Ported from 8.x-3.x:
    - Issue #3213547: Use ::class constant everywhere...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.