Content
View differences
Updated by Jens Ulferts almost 4 years ago
### **Environment**:
community.openproject.org (12.1.0)
Chrome
### **Steps to reproduce:**
1. Open work package notification in notification center.
2. Edit entry in latest activity (comment) and add image (which is a screenshot taken e.g. with Snipping tool (but not saved)).
3. Paste it into comment.
### **Actual Behavior**
Error message shown. Image not added.
<figure class="image op-uc-figure" style="width:50%;"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/30755/content"></div></figure>
<figure class="image op-uc-figure" style="width:50%;"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/30754/content"></div></figure>
### **Expected Behavior**
Image added.
### Implementation notes
* Instead of destroying an existing journal after the successor is created:
* Check before whether the topmost journal will be replaced. If that is the case continue.
* Clean the data holding journal tables of the references to the journal to be replaced:
* `xyz_journals` (e.g. `work_package_journals`)
* `customizable_journals`
* `attachable_journals`
* Update `journals` table (e.g. `notes` and `updated_at`)
* Create data holding journal entries (see above)
* There might already be `notifications` entries created when the journal is updated. Either all of those or those that are `:mentioned` need to be set to `read_ian` false
community.openproject.org (12.1.0)
Chrome
### **Steps to reproduce:**
1. Open work package notification in notification center.
2. Edit entry in latest activity (comment) and add image (which is a screenshot taken e.g. with Snipping tool (but not saved)).
3. Paste it into comment.
### **Actual Behavior**
Error message shown. Image not added.
<figure class="image op-uc-figure" style="width:50%;"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/30755/content"></div></figure>
<figure class="image op-uc-figure" style="width:50%;"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/30754/content"></div></figure>
### **Expected Behavior**
Image added.
### Implementation notes
* Instead of destroying an existing journal after the successor is created:
* Check before whether the topmost journal will be replaced. If that is the case continue.
* Clean the data holding journal tables of the references to the journal to be replaced:
* `xyz_journals` (e.g. `work_package_journals`)
* `customizable_journals`
* `attachable_journals`
* Update `journals` table (e.g. `notes` and `updated_at`)
* Create data holding journal entries (see above)
* There might already be `notifications` entries created when the journal is updated. Either all of those or those that are `:mentioned` need to be set to `read_ian` false