Page MenuHomePhabricator

Can't save after deleting a statement (and not doing anything else)
Closed, ResolvedPublicBUG REPORT

Description

Steps to Reproduce:

  • Go to a File page where the file has one or more depicts statements.
  • Click 'edit' to edit the depicts statements.
  • Note that the 'publish' button is greyed out
  • Click the trash can to delete a statement

We have this:

  • 'publish' button still greyed out - you can't save

We want this:

  • 'publish' button not greyed out - you can save

Acceptance criteria:

  • When editing existing depicts and (only) removing one, user should be able to submit the form, saving the removal

QA Results

StatusDetails
✅ PassedT218318#5071888

Event Timeline

Ramsey-WMF moved this task from Untriaged to Next up on the Multimedia board.
Ramsey-WMF added a subscriber: matthiasmullie.

Ooh this is a juicy one. Perhaps related to the "Publish Changes" work that @matthiasmullie did a while ago? (T216454)

Yeah, probably.

Looks like just a simple typo at first sight.
DepictsPanel.js has: if ( changes.length > 0 || removals().length > 0 ) {
Should probably be: if ( changes.length > 0 || removals.length > 0 ) {

I suspect that'll fix it.
(No time to commit, check & test right now, but I'll do so tomorrow unless someone else has in the meantime)

Which software project is this about? Something SDC'ish? Tags welcome. :)

Yup, I was just doing that :)

Which software project is this about? Something SDC'ish? Tags welcome. :)

Ha78na subscribed.

I can grab this -- I was just looking at this code actually since its the model for the captions button work i was doing

Change 496561 had a related patch set uploaded (by Ha78na; owner: Ha78na):
[mediawiki/extensions/WikibaseMediaInfo@master] Can't save after deleting a statement

https://gerrit.wikimedia.org/r/496561

Change 496561 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Let statements be still saved after deleting a statement

https://gerrit.wikimedia.org/r/496561

Test Result

Status: ✅ PASS
OS: macOS Mojave
Browser: Chrome

Test Artifact(s):

Go to a File page where the file has one or more depicts statements.
Click 'edit' to edit the depicts statements.
Note that the 'publish' button is greyed out

Screen Shot 2019-03-30 at 9.20.21 AM.png (2×2 px, 1 MB)

Click the trash can to delete a statement
'publish' button not greyed out - you can save
Acceptance criteria:

Screen Shot 2019-03-30 at 9.21.17 AM.png (2×2 px, 1 MB)

When editing existing depicts and (only) removing one, user should be able to submit the form, saving the removal

Screen Shot 2019-03-30 at 9.21.48 AM.png (2×2 px, 1 MB)

Edtadros updated the task description. (Show Details)
Edtadros subscribed.
Ramsey-WMF added a subscriber: PDrouin-WMF.

Tested and passed on test commons. Throwing over to @PDrouin-WMF

@Ramsey-WMF tested and passed on Test Commons as well