Project

General

Profile

Defect #1393

Cannot save plugin settings

Added by Angelinsky7 Angelinsky7 over 7 years ago. Updated about 7 years ago.

Status:
Rejected
Priority:
Low
Category:
Project settings
Target version:
-
Source:
Development
Detected on version:
Blocked:
No
Alone:
No
Milestones:
Sprint:

Description

For a strange reason with the new version of Redmine, if i try to save some settings, i lost all the plugin settings.


Related issues

Is duplicate of Scrum - Defect #1381: Scrum plugin doesn't work with redmine 3.4.xResolvedActions
#1

Updated by Angelinsky7 Angelinsky7 over 7 years ago

after searching for a while, i found out that was the .to_s in the settings class that was missing...
for a strange reason when i did apply the 0.17 update the change was not applied.
so we can close this false issue.
thanks again

#2

Updated by Jürgen Schreier over 7 years ago

Can you please elaborate more?
I tried to install 0.17.0 on Redmine 3.4.2 and every setting I try to apply is lost after saving.

Environment:
Redmine version 3.4.2.stable.16952
Ruby version 2.3.3-p222 (2016-11-21) [x86_64-linux]
Rails version 4.2.8
Environment production
Database adapter Mysql2
SCM:
Subversion 1.8.10
Git 2.1.4
Filesystem
Redmine plugins:
recurring_tasks 1.6.0
redmine_checklists 3.1.5
redmine_create_git 0.2.0
redmine_github_hook 2.1.0
redmine_image_clipboard_paste 3.3.0
redmine_timesheet_plugin 0.7.0
reminderemails 0.0.1
scrum 0.17.0

#3

Updated by Angelinsky7 Angelinsky7 over 7 years ago

if you look into the settings files : https://redmine.ociotec.com/projects/redmine-plugin-scrum/repository/revisions/master/entry/lib/scrum/setting.rb @line 177

before all the call were :

::Setting.plugin_scrum[setting] 

and now it should be
::Setting.plugin_scrum[setting.to_s] 

like in this example :

    def self.setting_or_default(setting)

      ::Setting.plugin_scrum[setting.to_s] || Redmine::Plugin::registered_plugins[:scrum].settings[:default][setting]

    end

    def self.setting_or_default_boolean(setting)

      setting_or_default(setting) == '1'

    end

    def self.setting_or_default_integer(setting, options = {})

      value = setting_or_default(setting).to_i

      value = options[:min] if options[:min] and value < options[:min]

      value = options[:max] if options[:max] and value > options[:max]

      value

    end

    def self.collect_ids(setting)

      (::Setting.plugin_scrum[setting.to_s] || []).collect{|value| value.to_i}

    end

    def self.collect(setting)

      (::Setting.plugin_scrum[setting.to_s] || [])

    end

I don't know why in the source code it's like that and not in the zip file but.... you could always change it by yourself (be aware that there is more change to do in that file)

#4

Updated by Jürgen Schreier over 7 years ago

Hello Angelinsky7,

thanks for elaborating this for me.
That actually helped me alot - only problem left here is the story points.
Here using your suggested prodcedere doesn't solve the problem.
I still keep getting this error: “Story points custom field” plugin setting isn't configured, you can configure it in Administration » Plugins » Scrum Redmine plugin

Did you do anything special to get this also working?

best regards

Jürgen

#5

Updated by Angelinsky7 Angelinsky7 over 7 years ago

Jürgen Schreier escribió:

Hello Angelinsky7,

thanks for elaborating this for me.
That actually helped me alot - only problem left here is the story points.
Here using your suggested prodcedere doesn't solve the problem.
I still keep getting this error: “Story points custom field” plugin setting isn't configured, you can configure it in Administration » Plugins » Scrum Redmine plugin

Did you do anything special to get this also working?

best regards

Jürgen

did you change that ? @line 66 from latest file

    %w(blocked_custom_field_id

       simple_pbi_custom_field_id

       story_points_custom_field_id).each do |setting|

      src = <<-END_SRC

      def self.#{setting}

        ::Setting.plugin_scrum[:#{setting}.to_s]

      end

      END_SRC

      class_eval src, __FILE__, __LINE__

    end

#6

Updated by Jürgen Schreier over 7 years ago

Jepp I did this. But unfortunately I made a syntax error:
I used it like this (gave no errors though):
::Setting.plugin_scrum[:#{setting.to_s}]

So thanks alot for your support - it works now!

#7

Updated by Jürgen Schreier over 7 years ago

Hello Angelinsky7,

did you happen to see this here:
https://redmine.ociotec.com/issues/1381#change-2523

I would really appreciate your feedback on my question there as well.

best

Jürgen

#8

Updated by Emilio González Montaña about 7 years ago

  • Status changed from New to Rejected

Duplicated of #1381.

BTW the new version already released fix this problem.

#9

Updated by Emilio González Montaña about 7 years ago

  • Is duplicate of Defect #1381: Scrum plugin doesn't work with redmine 3.4.x added

Also available in: Atom PDF