FIX: Keep tags when switching to shared draft

FIX: Keep tags when switching to shared draft

diff --git a/app/assets/javascripts/select-kit/components/composer-actions.js.es6 b/app/assets/javascripts/select-kit/components/composer-actions.js.es6
index 0ab04b0..be9902d 100644
--- a/app/assets/javascripts/select-kit/components/composer-actions.js.es6
+++ b/app/assets/javascripts/select-kit/components/composer-actions.js.es6
@@ -276,6 +276,7 @@ export default DropdownSelectBoxComponent.extend({
     options.action = action;
     options.categoryId = this.get("composerModel.categoryId");
     options.topicTitle = this.get("composerModel.title");
+    options.tags = this.get("composerModel.tags");
     options.skipDraftCheck = true;
     this._openComposer(options);
   },
diff --git a/test/javascripts/acceptance/composer-actions-test.js.es6 b/test/javascripts/acceptance/composer-actions-test.js.es6
index acf39c5..9ee3868 100644
--- a/test/javascripts/acceptance/composer-actions-test.js.es6
+++ b/test/javascripts/acceptance/composer-actions-test.js.es6
@@ -7,6 +7,9 @@ acceptance("Composer Actions", {
   settings: {
     enable_whispers: true
   },
+  site: {
+    can_tag_topics: true
+  },
   beforeEach() {
     _clearSnapshots();
   }
@@ -131,16 +134,21 @@ QUnit.test("shared draft", async assert => {
   toggleCheckDraftPopup(true);
 
   const composerActions = selectKit(".composer-actions");
+  const tags = selectKit(".mini-tag-chooser");
 
   await visit("/");
   await click("#create-topic");
 
   await fillIn("#reply-title", "This is the new text for the title");
   await fillIn(".d-editor-input", "This is the new text for the post");
+  await tags.expand();
+  await tags.selectRowByValue("monkey");
 
   await composerActions.expand();
   await composerActions.selectRowByValue("shared_draft");
 
+  assert.equal(tags.header().value(), "monkey", "tags are not reset");
+
   assert.equal(
     find("#reply-control .btn-primary.create .d-button-label").text(),
     I18n.t("composer.create_shared_draft")

GitHub sha: a8342456

1 Like

This commit has been mentioned on Discourse Meta. There might be relevant details there: