Problem/Motivation

  • Currently, all existing change record nodes are automatically listed at (e.g.) https://drupal.org/list-changes/drupal.
  • Starting soon, it will be required to draft a change records for relevant core issues before the patch for a given issue is committed.
  • Having "draft" change records for API changes that are not yet complete will confuse developers.
  • So, draft change records should not be listed on https://drupal.org/list-changes/drupal, but should behave like normal change records otherwise.

Proposed resolution

  • Add a Change record status field to the change record content type.

  • Add three child tabs to the change record listing page: Published, Draft, and Review. "Published" and "Draft" are published and draft change records, respectively. "Review" are draft change records associated with fixed or closed (fixed) issues.

    Published (default)

    Draft

    Review

  • Make the Change record status field default to "Draft change". When a draft change record is created, add a message informing the user where the draft change records can be listed.

  • When the change record and its issue are ready, the field can be checked ("Published") and the change record will appear in the default list. The node creation date is also updated when the change record is published.

  • Update existing change records to a "published" value.

Remaining tasks

Attached patch implements the proposed resolution. You can see the new feature in action at:
http://project-issues-drupal.redesign.devdrupal.org/list-changes/drupal
http://project-issues-drupal.redesign.devdrupal.org/node/2143392
http://project-issues-drupal.redesign.devdrupal.org/node/2143391
http://project-issues-drupal.redesign.devdrupal.org/node/add/changenotice
Test site credentials: drupal/drupal for the http auth; testable/testable for the site user

Deployment instructions

  1. After updating the feature, run update.php to set the change record status field value on all existing change records.
  2. At admin/structure/block, configure the Issue page draft API changes block identically to the Change records for issue page block (weight, region, visibility settings, etc.)
  3. Announce the new feature and policy change on g.d.o/core.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xjm’s picture

Note that I've filed the issue as major because there's a Drupal core policy change that will be waiting on it, but please adjust the priority if appropriate.

xjm’s picture

Ahem. :)

dww’s picture

Status: Needs review » Needs work

Seems like a good idea. +1 to the proposal. Even without this being a policy change in core, this would be useful. ;)

However, the patch needs work:

A) (most importantly) This hunk reverts and re-introduces #2135759: DATA LOSS: Change record issue reference field is single-value:

@@ -1003,7 +1072,7 @@ function drupalorg_change_notice_field_default_fields() {
   $fields['node-changenotice-field_issues'] = array(
     'field_config' => array(
       'active' => '1',
-      'cardinality' => '-1',
+      'cardinality' => '1',
       'deleted' => '0',
       'entity_types' => array(),
       'field_name' => 'field_issues',

I know you're building this out on a dev site, but you have to make sure you're working against the very latest copy of the change records feature. You can checkout a copy of drupalorg directly from git into sites/default/modules/drupalorg, disable/re-enable this feature, and then revert it via the Features UI to (hopefully) get the dev site up to date with the latest code. Then re-create your feature. Or something...

B) Why have a whole new display for these? Why not just expose the filter on draft vs. committed/final (or whatever the term we're going to use is) on the existing view? Let the filter default to not-draft, but if people need to see draft ones, they can? Just seems likely to cause functionality drift between the two displays over time, and that it'll be easier to maintain and use if the change records are always in the same place, but you can specifically filter for the draft records if you need to.

Thanks,
-Derek

xjm’s picture

Whoops, I thought I unstaged that hunk... must not have reset the branch before I diffed. ;)

Also good suggestion on adding a draft filter instead. Will reroll shortly.

xjm’s picture

Status: Needs work » Needs review

This time without the accidental reverts, and just adding a filter to the existing display.

I've also added a hook_update_N() to set the field value to "live" by default for existing change records. At first I tried to do unholy things to the exposed filter to make NULL entries show up in a usable/expected way but then decided that was probably not the best course of action. ;)

xjm’s picture

Attaching the patch....

xjm’s picture

FWIW I ran the hook_update_N() on the dev site successfully; you can see the view now working at http://project-issues-drupal.redesign.devdrupal.org/list-changes/drupal.

xjm’s picture

Issue summary: View changes
webchick’s picture

Reviewed this.

  1. (separate issue) The "Add new change record" link appears even for anon users. Same as on d.o.
  2. (separate issue) The Project field used to default to Drupal core and no longer does. Same as on d.o.
  3. (deployment blocker) Unlike on d.o right now, using the Project autocomplete field here does not list "Drupal core" as the first result when entering "drupal" in the box. Instead it lists lowercase "drupal" which is node 2066111, not node 3060. Additionally, "Drupal core" is not anywhere in the list of autocomplete results since it cuts off after 10 results and seems to be sorting alphabetically. This is going to be a complete cluster-bleep if not fixed before deployment. :)
  4. (separate issue) OMFFFFG @ not being able to enter a node ID for related issues. :( Same as on d.o.
  5. (deployment blocker) We lost the ability to add multiple issues here.
  6. (question) Why can you upload files here? I guess for images? Same as on d.o.
  7. (regression) The "Impacts" field order got mixed up somehow. On d.o, it's above Updates done, but in the sandbox, it's at the very bottom, where it's likely to be missed.
  8. (deployment blocker) Ok, I now made http://project-issues-drupal.redesign.devdrupal.org/node/2143393 as a draft. But there's no way to navigate to it that I can see. We should do one of the following, since manual intervention is required to uncheck that Draft checkbox, which may or may not ever actually get done:

    a) Add a tab to http://project-issues-drupal.redesign.devdrupal.org/list-changes/drupal to review draft notices.
    b) Include drafts in the main results listing but style them differently/prepend "[DRAFT]" to the title, etc.

    Basically, someone is going to need to sift through these prior to beta/RC and clean them out, so there needs to be a way to get at all of them quickly, as well as a way to clearly differentiate "this is an actual thing" vs. "this is still in progress."

    Nevermind, there's a filter there that I missed.

Also musing on whether it makes sense for "draft" to be the default. I guess that it does in the case of core once the policy change goes into effect, but not sure about contrib. Hm.

webchick’s picture

Status: Needs review » Needs work
xjm’s picture

Points 3, 5, and 7 are all just this dev site being behind the current state of d.o. Not (re)introduced by the patch.

I don't understand 8, will post screenshots in a second.

xjm’s picture

Status: Needs work » Needs review
FileSize
61.64 KB

In answer to #8.

webchick’s picture

Yeah, sorry. I see now that the view has a filter for "Change record status" which I totally missed since it's at the very end. I haven't played much with D7 views in awhile; it it possible for this to be exposed as just a check box that says "Show drafts"? If not, it's probably fine; you can at least get to it, which was my concern. :)

xjm’s picture

Regarding the draft status default for core vs. contrib, I dislike the idea of adding a project one-off, since the field can be quickly toggled. Also the fact of the matter is that it's mostly just core and views using change records at present and for the two-or-whatever years since we added them. :)

xjm’s picture

it it possible for this to be exposed as just a check box that says "Show drafts"? If not, it's probably fine; you can at least get to it, which was my concern.

I tried that at first, but I was doing unholy form alters to the exposed filter and it also looked a little odd compared to the other filters. :)

webchick’s picture

Although, I guess just for completeness... the thing that made me log that as a deployment blocker is I created a change notice, then went to the list and didn't see it, so I worried my data was lost. I predict I won't be the first person to think something bad happened and file a bug report about it. Trying to think of what we could do to prevent this. Maybe a dsm() on create "Draft change notice created. You can view other drafts"? Not sure.

webchick’s picture

Btw, defaulting Draft to false would help alleviate those "lost data" concerns.

xjm’s picture

Btw, defaulting Draft to false would help alleviate those "lost data" concerns.

I'd prefer to look at other ways of promoting the draft list, like help text for the draft field and maybe a hook_node_insert() implementation. Making it false loses two benefits:

  1. Draft first is no longer the "default" workflow.
  2. Novices are still likely to accidentally create drafts as live and get eaten up by angry core devs for misinformation.
dww’s picture

Re #9.4: See #2131965: add an Entity Reference Selection Handler for related issues. Now live. If you update your site to the latest project_issue code in the 7.x-2.x branch in Git (and drush cc all or enable/disable a module), you'll see a new EntityReference selection mode for your fields, and you can then do much nicer things with your issue references. It supports nid, #nid and title. It was supposed to support https://drupal.org/node/X too, and that worked on a dev site, but apparently it's barfing on production (for reasons my quick investigation couldn't explain).

Sounds like there's still a lot to be fixed before this is ready for actual review, but I'll leave the status alone for now...

FWIW, I like defaulting to draft, not live, for all the reasons xjm said in 18. I like the dsm() approach. It was my (stupid?) idea to have draft vs. live a filter on a shared view, but maybe it'd be clearer with two displays and menu tabs or something? But either way, the default display should be the live change records, whereas after you create something, it should start life draft (until vetted, etc). So, that's why I'm +1 to dsm(), and perhaps other solutions.

In fact, can we call this field something like field_publication_status and let it have actual values 'draft' and 'live' instead of double-negativing everything with a field called 'draft' and trying to make sense of TRUE/FALSE? ;)

Cheers,
-Derek

xjm’s picture

Status: Needs review » Needs work

Alrighty. :)

xjm’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
17 KB
48.24 KB
30.86 KB
12.53 KB

Alrighty. Attached implements the changes suggested above. First of all, I updated the feature on the dev site from the drupalorg git repo, so that there's no longer any confusion WRT things that are already fixed in HEAD (from @webchick's comment in #9). Then:

  • Per @dww, field name changed from field_draft_change_record to field_change_record_status. 1 is live (published) and 0 is draft, just like node status. Therefore, it's unchecked by default on node creation (to create a draft change record by default). The hook_update_N() has also been updated correspondingly.
  • Added help text to the field explaining what it's for.
  • Added a drupal_set_message() in hook_node_insert() when a draft change record is created, to give the user a link to the view of all drafts.
  • Moved the status filter up further in the view, so it's in the same order as the fields are on the node form (before the branch) and easier to find.
klonos’s picture

Couldn't we simply add "[DRAFT]" at the start of the title of change records that are not complete yet and be done with it? I'm sure it would be more than enough to signify such entries in the change record list and there would be no angry core developers eating anybody :P

I mean, sure yeah, storing the draft/live status as metadata somewhere is (or rather might prove to be) useful, and sure the whole save as draft by default unless specified otherwise does sound reasonable too, but the toggling of the view and the "View all draft change records" notice thing seem a bit too much trouble to me. Even the last screenshot above proves my point with the "[REVERTED]" keyword added to the title. It is more than enough to communicate what it means to.

So, how about we used the draft status to automatically prepend "[DRAFT]" to draft change records and remove it when they are set to live.

xjm’s picture

Part of the reason for having them not listed in the main view is that we don't want them to show up in the feed until they are actually made live. It's misleading and has in the past freaked people out. And being able to list the drafts separately to review and publish them is going to be valuable in our core process change where the draft is required before commit.

Really it's not much trouble at all; the feature is pretty simple. :) But I could add the bit about appending [DRAFT] to the title for clarity, if other folks agree it's worth doing.

YesCT’s picture

I agree with needing a status that does not go out in the feed and get tweeted.

I created a draft change notice once, and ... it did freak people out.

YesCT’s picture

appending [DRAFT] to the title might be nice... but would have to be manually removed after the change notice is reviewed/approved. And, I bet we will see a lot of: draft -> live change, followed by edits to the title.

So maybe instead, we can put [DRAFT] in the rows when viewing change notices, and also somewhere *near* the title on the view of the change notice itself.

webchick’s picture

Just trying to play devil's advocate here... if a change notice got tweeted out with "[DRAFT]" in the title, why would anyone be angry/freak out? Wouldn't that actually be helpful, to call larger attention to issues that are at or near RTBC, to see if folks outside the 4-8 people participating have concerns about their implementation?

I actually think #22 is a simple, no-software-changes-required way to implement this policy, vs. holding it up on this implementation being deployed.

webchick’s picture

Because, as I mentioned before, it is *super* jarring to not see the content you just created, and I worry that between that and people forgetting to uncheck the checkbox, this method may result in confusion. Would be good to have a few more testers.

webchick’s picture

Hm. And regardless of which way we go on this, we'll need to watch the publish date of these. The listing/feed is sorted by create date, so if a draft is created way back when the issue first starts out (because the people involved are trying to be proactive) it might be days/weeks/months later by the time it actually ends up "live" in the main listing. If we go the software way of handling this (vs. the "title default text" way), maybe blank out $node->created if draft gets unchecked?

klonos’s picture

appending [DRAFT] to the title might be nice... but would have to be manually removed after the change notice is reviewed/approved....

I wasn't talking about prepending the string to the actual title and storing it in the db. I was talking about rendering it only during display (rewriting the title field in the view for example) for the change notices that had status = draft.

Wouldn't that actually be helpful, to call larger attention to issues that are at or near RTBC...

Precisely what I had in mind when I proposed adding "[DRAFT]" as opposed to hiding the change notifications till the very last moment.

xjm’s picture

+1 for updating the publish date when the status is toggled. I can add a hook implementation for that.

We could do the title thing programmatically, yeah, maybe as a field formatter D8 thinking there... And we could also do something with the theming of draft change records to make it clearer they are in a draft state. I just wanted to develop the minimum feature possible to get this deployed so we can start using it in advance of the upcoming change record policy change, and was hoping to iterate on it afterward.

Is any of that something we can scope to followup issues? I'm sensitive to the fact that review and deployment for d.o features requires DA resources that are very strained at the moment, but this is a feature that would both streamline the core change record process and make things a ton easier for core mentoring.

Re: #27, would actually redirecting to the draft change record list be valuable? I'm really opposed to not filtering them out of the live change record list -- there is so much noise in it already, (edit) and I cannot over-emphasize how negative an experience it is for newer contributors trying this task to get blasted for potential errors in the draft change record, and how intimidating it is. We can promote the list of draft API changes separately, for sure, for the reasons you describe. But it should be separate.

xjm’s picture

Status: Needs review » Needs work
Issue tags: +core mentoring on drupal.org

NW for the published date bit, and so that dww doesn't invest time reviewing while we're still sorting out these implementation and UX details. :)

xjm’s picture

webchick’s picture

Redirecting to the draft list after creating a draft could work, yep. Then at least you've seen it once, so if you don't see it on the main listing when you go back you go "Huh? OH! Duh. Filter." vs. "OMG BUGZ! To the d7qa queue!" ;)

And I agree there's a balance between perfection and getting something out there, and leave that up to you to manage. I'm just giving feedback.

xjm’s picture

I experimented a bit with redirecting the form, but I actually found it far more annoying to be sent to the list rather than my newly-created change record draft. So leaving it as just a dsm() for now. I'm also going to try making the change status field itself more visible with a link to the full listing of whichever right there inline.

xjm’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
38.33 KB
43.89 KB
56.92 KB
15.15 KB
5.27 KB

Attached:

  • Resets the creation time when a change record is toggled from draft to published.
  • Puts back the label for the change record field so that it is more visible.
  • Changes the value labels for the field to make more sense.
  • Adds a link to all draft or live change records inline on the node whenever it is viewed, based on its status.
  • Adds a status column to the list changes page to make it very hard to miss which is draft or published. This is what people were trying to accomplish with the [DRAFT] title thing but actually less hacky and more legible. :)
YesCT’s picture

screenshots look very reasonable.

What does the edit form look like? Does it have instructions on when to use draft vs published?

https://drupal.org/contributor-tasks/draft-change-notification mentions drafting a notice and posting back to the issue. Maybe we can link to that from the create/edit change notice form?

When changing from draft to published does it say what is about to happen (that a tweet will go out?) I was really surprised the first time that happened to me.

[edit]
Also, what does the *issue* look like? (when a draft change notice is made)

YesCT’s picture

read through the code. (not with a fine tooth comb)

  1. +++ b/features/drupalorg_change_notice/drupalorg_change_notice.features.field.inc
    @@ -2160,6 +2229,8 @@ function drupalorg_change_notice_field_default_fields() {
    +  t('By default, change records are created in a draft state. Making the change live will make it appear on the default change list.');
    +  t('Change record status');
    

    making the change "live"?

    we could say, changing the status from draft to published
    ...
    will make it...
    and a tweet goes out from @drupalWhatever

  2. +++ b/features/drupalorg_change_notice/drupalorg_change_notice.install
    @@ -0,0 +1,27 @@
    +  // Re-save each as a live change record.
    +  $nodes = node_load_multiple($nids);
    +  foreach ($nodes as $node) {
    +    $node->field_change_record_status[LANGUAGE_NONE][0]['value'] = 1;
    +    node_save($node);
    +  }
    

    will this retrigger tweets?
    will it change their published dates?
    [edit to clarify] asking about update() that will resave all existing nodes

xjm’s picture

making the change "live"?

we could say, changing the status from draft to published

Or just replace "live" with "published"?

will make it...
and a tweet goes out from @drupalWhatever

Since this isn't part of d.o and not even owned by the DA, we shouldn't mention it.

will this retrigger tweets?
will it change their published dates?

Edit: I misunderstood what YesCT was asking. Answer: The update hook will not change the contents of the RSS feed (and therefore not the twitter account), BUT it might inappropriately change dates for existing nodes. Will fix.

xjm’s picture

What does the edit form look like? Does it have instructions on when to use draft vs published?

See in the summary.

https://drupal.org/contributor-tasks/draft-change-notification mentions drafting a notice and posting back to the issue. Maybe we can link to that from the create/edit change notice form?

I think this is out of scope. We should just update that handbook page once this feature is deployed.

When changing from draft to published does it say what is about to happen (that a tweet will go out?) I was really surprised the first time that happened to me.

As above; not our problem really.

[edit]
Also, what does the *issue* look like? (when a draft change notice is made)

Same as in production. :)

Thanks!

xjm’s picture

Status: Needs review » Needs work
xjm’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
32.54 KB
41.43 KB
18.51 KB
38.39 KB
15.57 KB
3.72 KB
31.65 KB

Alrighty, attached fixes the bug with the presave hook @YesCT spotted and updates the UI text. I updated the images in the summary as well.

I confirmed that the update hook behaves correctly by deleting the field and all its values, reverting the feature to its HEAD state, re-updating the feature, and running the update hook.

xjm’s picture

@YesCT's review reminded me to double-check... of course we actually need to add the filter to the feed display so it lists only the published ones! Duh. Fixed in attached.

Berdir’s picture

https://drupal.org/node/1643406 is one that should be changed to a draft once this is live :)

xjm’s picture

Issue summary: View changes
webchick’s picture

Reviewed this with Jesse Beach and Alex Bronstein today, with Jesse playing the role of "new user." Everything looks great, apart from one small suggestion. Since there's no one tasked with flipping the published bit process-wise, there's a good chance this is going to fall through the cracks from time to time. So it'd be good if on the referenced issue themselves, it was clear whether the referenced change notice was a draft or not.

A couple of ways this could be done:

1) A separate block that's "Draft change notices" vs. "Change notices" as the title.
2) Prepend "[Draft]" or something to the title of the issue in the block.

This way, a standing item during core mentoring hours could be to revisit fixed issues and make sure that their change notices were properly switched, and it'd be easy to tell.

Berdir’s picture

When doing something that would require code changes anyway, why not add a view that lists fixed/closed issues that reference draft change notices?. Would be way more efficient to detect this I think?

There might be some false positives, with draft change notices also referencing related issues that were already fixed, but I don't think there are too many of those.

webchick’s picture

xjm also suggested that. my concern was exposing that in the UI in a sane way. No idea what the title of that tab would be.

webchick’s picture

Status: Needs review » Needs work

Marking "needs work" to reflect that there is more to do here.

xjm’s picture

Status: Needs work » Needs review
FileSize
31.64 KB
15.44 KB
18.28 KB
24.59 KB
78.38 KB
47.82 KB

Attached:

  1. Changes the existing change record issue sidebar block to only list published change records.

  2. Adds an additional "Draft change record" issue sidebar block to easily distinguish draft change records. Looks pretty much the same as the existing one:

    In the rare case that an issue has two different change records associated with it and one is a draft but another is not, both blocks are displayed:

    I checked with @tvn and d.o's block configurations are not exported anywhere, so upon deployment, this block will need to be configured exactly like the existing change record block (weight of 1, sidebar second, same visibility settings).

  3. Adds a separate display to quickly list draft change records for fixed or closed (fixed) issues:

  4. The last part of this patch is up for discussion. We could either link this additional display from the main change record listing, or leave it out of the existing UI and just have contributors who are wrangling change records navigate to the URL directly:

    (Note that there is a pipe character between the links; it's just partially covered up by my annotation.)
    If this is too busy we could either reword the link, or remove it. Thoughts?

klonos’s picture

Just a minor suggestion: having a drop-down for only two choices requires two clicks to change. Seems to me that it would make more sense if we had some sort of toggle in place instead. If you agree, perhaps we could change it to a radio button set instead with the label placed above and the two options (published/draft) inline right below it.

xjm’s picture

Just a minor suggestion: having a drop-down for only two choices requires two clicks to change. Seems to me that it would make more sense if we had some sort of toggle in place instead. If you agree, perhaps we could change it to a radio button set instead with the label placed above and the two options (published/draft) inline right below it.

I started to try that at first, but it would require some unholy form altering of the exposed form. We don't do this anywhere else on d.o, so I'd prefer to leave it using the default views form rendering.

klonos’s picture

...as I said: just a thought.

Thanx for taking the time to reply/explain.

webchick’s picture

Looking at the screenshot in #49.4, that feels strange to me. The reason is that "Add blah-dee-blah" is an "action link" pattern in D7+ and typically we do not put "View blah-dee-blah" stuff there. Those are instead generally done as tabs (see for example admin/comment vs. admin/comment/approval).

So borrowing from that standard UX practice in Drupal, and also to klonos's point about a drop-down w/ two items in it being weird, I would personally do this as 3 separate displays:

Published / Draft / Review

Because in the third instance, one of two things happened:

a) We just marked an issue as fixed, and its draft change notice is about to be published
b) Oops, we marked the issue fixed long ago and totally forgot to change its change notice status.

And in either case, it needs review. :)

I know dww previously said in #3.B that filters were better, but IMO that's mainly true if we're talking about 2 choices, and now we've upped it to 3. While the ongoing maintenance efforts are worth bearing in mind (like if we add a new column, we need to do it in 3 places now), I think this way would be more aligned with what core does, and also doesn't create any "secret handshake" knowledge that people need to know in order to help this process.

xjm’s picture

Status: Needs review » Needs work

Rerolling with that, which seems better UX to me.

xjm’s picture

Status: Needs work » Needs review
FileSize
59.22 KB
45.78 KB
28.86 KB
43.14 KB

Here's an update that implements this change. Attached screenshots show the three tab displays.



xjm’s picture

Issue summary: View changes
xjm’s picture

Issue summary: View changes
Status: Needs review » Needs work

Just realized I did not adjust the links to the draft page elsewhere in the patch.

xjm’s picture

Status: Needs work » Needs review
FileSize
42.94 KB
2.1 KB

Fixed here. I think this could use a full review now if possible. Thanks everyone!

xjm’s picture

Issue summary: View changes
drumm’s picture

Status: Needs review » Fixed

Committed & deployed.

jhodgdon’s picture

Status: Fixed » Needs work

drumm asked me to check out the newly deployed code. This one has two problems:

a) If I go to
https://drupal.org/list-changes
all is well.

But there is a link at the top there for "Review", which links to
https://drupal.org/list-changes/review

On that page it says:
Invalid project or no changes found.

That is misleading. I don't really know what it means actually. If there is no project, it should just default to Drupal Core like the other tabs do (or at least they appear to be doing), and if there are no changes, it should just tell me that.

b) The other problem is that if I start from a different project, like
https://drupal.org/list-changes/views
the links near the top for Draft and Review do not have the project in the URL so they are not going to the Draft or Review status changes for Views.

drumm’s picture

I recommend doing followups on a fresh dev site, after a snapshot is taken overnight. (Or after a couple drafts are posted, then overnight.) I can re-create the dev site tomorrow.

jhodgdon’s picture

I'm also not seeing any "Review" change notices at all. It says they are for issues marked "fixed" and "closed/fixed" in the issue comments above, so there should be a ton of them for Drupal Core. Where are they?

And I created a test one in "draft" mode for the Simple Google Maps project. After creating it it gave me a link to "see all draft change notices" but it was empty, probably because it wasn't a Drupal Core change notice? I changed the project to Drupal Core and then the link was correct.

Berdir’s picture

Review only lists *draft* (as the description says) notices that reference fixed issues, the idea is that they are now ready to be published. There are no draft change notices, so the list is obviously empty :)

Maybe needs a better title, but it is working as expected.

jhodgdon’s picture

Well, that's confusing.

xjm’s picture

FileSize
38.21 KB

This is what I see on the review tab:

Maybe the empty text just needs to be improved?

Also, yeah, a rebuild of project-issues-drupal.redesign.devdrupal.org would be helpful, but I think we need to check with the other person who was sharing that dev site to make sure that person won't lose work.

jhodgdon’s picture

When I first went there, I didn't notice that the "review" records needed to be both draft and either fixed or closed/fixed. Maybe because the status value was in bold but the "draft" wasn't? That might have alleviated my confusion, and would be an easy fix to make.

And yes, the empty text also needs to be improved -- take out the "invalid project" part.

However, there are issues about the project (see #61 & 63) that are serious bugs that need to be addressed. It doesn't look like the Draft/Review tabs/links take into account the project at all.

xjm’s picture

FileSize
21.91 KB

Okay, so here's what it looks like with no change records in the review tab:

The draft tab text is similarly confusing. So we just need to update the tab texts for all three tabs. I'm thinking:

No published change records found.

No draft change records found.

No draft change records associated with fixed issues were found.

...And lose the bit about "invalid project", and change the argument handling to throw a 404 for a bad project if it isn't already doing so anyway.

xjm’s picture

Re: #67, it's impossible to create menu tabs in views that contain arguments. So they necessarily list change records for all projects in each category. You can filter it by project by adding the project name to the URL, same as it has always been for the main list. It's not any different, and I don't think it's a bug. We could make the tabs say "All published", "All draft", "Review"...?

jhodgdon’s picture

#68 sounds good.

#69 doesn't sound good at all. What would you get if you clicked on Draft or Review and then clicked back on the Published link -- all notices or just Drupal Core? Because, unless I am mistaken, the Published page currently defaults to Drupal Core if no project is specified.

I think that is also happening for the other two tabs, actually. See #63 -- after creating a draft notice for a different project, it didn't show up.

Anyway... I think this change should be reverted for now. It is not really working in a sensible way. If tabs can't be used then figure out a different way to provide the links, but having Published be different from Draft/Review doesn't make any sense to me.

drumm’s picture

changerecords-drupal.redesign.devdrupal.org will be ready within 2 hours.

jhodgdon’s picture

One thought on the menu tabs would be to use a Views Header that outputs markup very similar to Menu Tabs, but has the right links in it. Wouldn't that be fairly easy to do? I think you can use the views args, and/or fields from the first row, as placeholders in header text?

xjm’s picture

@jhodgdon, can you provide links for the displays that are not working as you expect?

Please, for goodness' sake, do not revert this. 99% of the change records are for core; very few change records for other projects are actually affected by the bug you describe. And a change in core policy has been waiting on this feature for two months.

drumm’s picture

I don't like reverting things. It is almost always better to keep improving. And this added a field with data we don't want to throw away lightly.

(In hindsight, for future projects like this, I recommend try splitting into two phases. First, add only the field and let people start using the new data. Wait for some use in production, so the work on the Views will be informed by real data.)

jhodgdon’s picture

See #63 - has a reproduce, 2nd paragraph. Sorry, can't work more on this today, urgent work came up.

YesCT’s picture

  • Commit f303234 on 7.x-3.x, 7.x-3.x-dev authored by xjm, committed by drumm:
    [#2151041] Add a "draft" status for change records
    

  • drumm committed f303234 on 2299191-beta_project_issue_project_searchapi authored by xjm
    [#2151041] Add a "draft" status for change records
    
YesCT’s picture

what are the remaining tasks here?

  • drumm committed f303234 on 2322267-migrate-country-field authored by xjm
    [#2151041] Add a "draft" status for change records
    

  • drumm committed f303234 on 2322267-migrate-gender-field authored by xjm
    [#2151041] Add a "draft" status for change records
    

  • drumm committed f303234 on 2348121-missing-bio-information authored by xjm
    [#2151041] Add a "draft" status for change records
    

  • drumm committed f303234 on 2350591-not-spammer-role authored by xjm
    [#2151041] Add a "draft" status for change records
    

  • drumm committed f303234 on 2322267-bakery-sync-country authored by xjm
    [#2151041] Add a "draft" status for change records
    

  • drumm committed f303234 on random-supporter-logos authored by xjm
    [#2151041] Add a "draft" status for change records
    

  • drumm committed f303234 on hosting-type-field authored by xjm
    [#2151041] Add a "draft" status for change records
    

  • drumm committed f303234 on filter-partners-by-sector authored by xjm
    [#2151041] Add a "draft" status for change records
    

  • drumm committed f303234 on restrict-commit-issue-notifications authored by xjm
    [#2151041] Add a "draft" status for change records
    
webchick’s picture

Independently came across the bug described here at #2452133: "Drafts" tab on change records universally points to Drupal core's drafts, not a given project's. Though it's kind of a dupe it has a narrower scope and is therefore hopefully more actionable.

(I would add it as a related issue but that doesn't seem to work on the phone since the issue summary / relationships field set isn't expanding. The org credit worked though, nifty. :))

jhodgdon’s picture

Yeah, well it's been a whole YEAR and the bugs have been ignored. Good luck.

andypost’s picture

quietone’s picture

Found this issue from reading #2173425: [META] Merge DrupalMentoring.org features into Drupal.org.

Looks like everything has been done here. The points in the IS are complete.

The last few comments are about the link to drafts pointing to Core issues and not project issues. I double checked that by visiting the change notices for Drupal Commerce. The menu links are all project specific and I never wound up looking at only Core change records.

I think it is safe to close this as fixed.

andypost’s picture

It still needs work for breadcrumbs or tabs

steps

- visit https://www.drupal.org/list-changes/drupal/drafts - breadcrumbs is "Published"
- click first draft in table - atm https://www.drupal.org/node/3204546
- link in breadcrumbs leads to https://www.drupal.org/list-changes/drupal (published) but displays as "Change records" (expects "Draft")

- visit https://www.drupal.org/list-changes/drupal/review - breadcrumbs is "Published"
- click first CR to review - atm https://www.drupal.org/node/3195578
- link in breadcrumbs leads to https://www.drupal.org/list-changes/drupal (published) but displays as "Change records" (expects "Review")

quietone’s picture

@andypost, thanks for pointing that out. Since the problem with breadcrumbs is not mentioned in the IS or in any other comment in this issue shouldn't this be closed and a new issue opened for that?

andypost’s picture

I find it minor, so follow-up sounds better

quietone’s picture

Status: Needs work » Fixed

Thanks, created a follow up and closing this as fixed. #3205291: Fix breadcrumbs on change notices

Status: Fixed » Closed (fixed)

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