Closed hi-ko closed 4 years ago
@felipebatista, in our fork I added the project name in the message to replace zulip's message subject in the locale yml. If others prefer ticket subject instead best would be to add a config param in the plugin to select between project name and issue subject which should be evaluated in the issue_patch.rb.
hello @hi-ko, please try the new unreleased versions 2.1-alpha1 or 3.1-alpha1
in these versions topics are configured as expressions, so you can set ${project_name} on your topics settings.
all variables available:
thank you!
amazing - thank you! you'll get feedback asap ...
Hi @felipebatista,
when I try to install the 3.1-alpha1 branch I get the following exception when running bundle exec rake redmine:plugins:migrate RAILS_ENV=production
:
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
class AddSubjectsPatternSettings < ActiveRecord::Migration[4.2]
/var/lib/gems/2.5.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:528:in `inherited'
/opt/redmine/plugins/redmine_zulip/db/migrate/20191015152900_add_subjects_pattern_settings.rb:1:in `<top (required)>'
...
I added version 5.1 but don't know if this is the correct version and now the rake task workds:
grep -rl "ActiveRecord::Migration$" plugins/redmine_zulip/ | xargs sed -i 's/ActiveRecord::Migration/ActiveRecord::Migration[5.1]/g'
when updating an issue I now get:
Completed 500 Internal Server Error in 103ms (ActiveRecord: 17.6ms)
NoMethodError (private method `zulip_settings' called for #<Issue:0x000055dab310a778>):
plugins/redmine_zulip/lib/redmine_zulip/issue_patch.rb:86:in `block (2 levels) in <module:IssuePatch>'
app/controllers/issues_controller.rb:552:in `save_issue_with_child_records'
app/controllers/issues_controller.rb:169:in `update'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'
hello @hi-ko sorry for this, please try version 3.1-alpha2 and let me know
very cool. That did it! What is the mimik having all the config values in redmine plugin config and in projects config? project config overwrites global config?
should be covered in the readme: admin/plugins/redmin_zulip defines defaults which could be overwritten in the projects zulip config tab
@hi-ko, do you think the description in 3.1-beta1 README is clear enough? if not, what change would you do to make it so?
thank you very much
@felipebatista, I'm very sorry. I overlooked the changes you already made in the README.md absolutely clear - no changes required. thanks again.
Unfortunately in version>= 2.0 the naming for the topic changed from project name to ticket subject. Using version 1.0 we had a clean structure in zulip having a top level project as stream name and the lower level project name as topic. Now the structure is completely confused because for every ticket in any subproject a new topic is created which does not fit in the existing structure. So we have to roll back to version 1.0 and fix the structure manually in the zulip database.
Fix should be to make stream and topic configurable where the value should support variables or should be a LOV like topic: "$project_name".