app/commands/decidim/proposals/admin/create_proposal.rb in decidim-proposals-0.28.3 vs app/commands/decidim/proposals/admin/create_proposal.rb in decidim-proposals-0.28.4
- old
+ new
@@ -56,10 +56,13 @@
attributes:,
author: form.author,
action_user: form.current_user
)
@attached_to = @proposal
+ Decidim.traceability.perform_action!(:publish, @proposal, form.current_user, visibility: "all") do
+ @proposal.update!(published_at: Time.current)
+ end
end
def attributes
parsed_title = Decidim::ContentProcessor.parse_with_processor(:hashtag, form.title, current_organization: form.current_organization).rewrite
parsed_body = Decidim::ContentProcessor.parse(form.body, current_organization: form.current_organization).rewrite
@@ -70,11 +73,10 @@
scope: form.scope,
component: form.component,
address: form.address,
latitude: form.latitude,
longitude: form.longitude,
- created_in_meeting: form.created_in_meeting,
- published_at: Time.current
+ created_in_meeting: form.created_in_meeting
}
end
def link_author_meeeting
proposal.link_resources(form.author, "proposals_from_meeting")