stefanzugal / accept-plugin

Accept plugin for redmine
MIT License
18 stars 4 forks source link

Accept not displayed in Redmine 3.2. #10

Closed adrianobr closed 8 years ago

adrianobr commented 8 years ago

Accept not show in Redmine 3.2.

The accept button does not show up. Why? The accept button will only show up if you are listed in the combo box with "Assigned to". If the issue is already closed, the button will not show up. If you have already accepted the issue - meaning that the issue is already in the defined accept state, the button will not show up.

I I verified the above and are all serving and even then the accept button is not displayed.

stefanzugal commented 8 years ago

Can you please check if the accept plugin shows up in your redmine administration are under "plugins"?

If this is the case, can you please navigate to an issue where you would expect the button to appear, open your developer console (usually F12) and paste the following code: $('.icon-accept')

adrianobr commented 8 years ago

Yes, the plugin appears in the extensions of redmine.

When performing a search on a task by the code: $ ( '. Icon-accept') is not found. But I see that the line is here: <Link rel = "stylesheet" media = "screen" href = "/ plugin_assets / Accept / stylesheets / style.css">

      isStatusPresent var = $ ( "# issue_status_id> option [value = 1]") length> 0.;
      isAssigneePresent var = $ ( "# issue_assigned_to_id> option [value = 5]") length> 0.;
      isNotAccepted var = $ ( "# issue_status_id") val () = 1.!;
      
      if (isStatusPresent && && isAssigneePresent isNotAccepted) {
       var button = $ ("<a class=\"icon icon-accept\" onclick=\"acceptTicket()\"> Accept </a>");
       $ ( "# .contextual Content: first") append (button);.
      }

      acceptTicket function () {
       $ ( "# Issue_status_id") val ( "1").;
       $ ( "# Issue_assigned_to_id") val (5).;
       $ ("# Update input [type = submit]") click ().;
       }

      

Only thing that does not show is the accept button.

stefanzugal commented 8 years ago

Ah, that is good that the plugin is loaded and the javascript code is added. So the question remains why the button is not added to the html. Could you please again visit the page in your redmine, open the developer console and paste the following statements:

$("#issue_status_id > option[value = 1]").length;

$("#issue_assigned_to_id > option[value = 5]").length;

$("#issue_status_id").val();

$("#content .contextual:first");

adrianobr commented 8 years ago

Now that you have passed these lines touched me you have 5 fixed ID. If my number 5 has not been to DO but BUILD. I passed the job to BUILD status (5) and went on to appear the ACCEPT. But for me it can not be fixed. If the Plugin settings can configure that BUG type of tasks to appear to accept the DO status is necessary to read the DO ID and not fixed using the ID 5.

Exemple: `` ID 5 is Build. I would accept that appear in making/DO

stefanzugal commented 8 years ago

I am sorry, I do not really understand the problem.

Hence, I am not really sure whether it helps in your case, but you can configure the type of the accept status for each tracker in the plugin settings.

janekska commented 8 years ago

I have similar problem. My systems is: Environment: Redmine version 3.0.3.stable Ruby version 1.9.3-p551 (2014-11-13) [x86_64-linux] Rails version 4.2.1 Environment production Database adapter Mysql2 SCM: Subversion 1.6.17 Mercurial 2.0.2 Git 1.7.9.5 Filesystem
Redmine plugins: accept 0.0.1 event_notifications 3.0.0 redmine_contacts 4.0.2 redmine_contacts_invoices 4.0.1 redmine_dashboard 2.5.0 redmine_logs 0.1.0 redmine_mail_reminder 3.0.0.0001 redmine_spent_time_in_issue_description 2.7 redmine_tags 3.0.0 redmine_theme_changer 0.2.0 redmine_timelog_timer 2.0.1 redmine_work_time 0.3.1

After pasting $('.icon-accept') in FF dev console I got: Object { length: 0, prevObject: Object, context: HTMLDocument → 836, selector: ".icon-accept" }

stefanzugal commented 8 years ago

I am afraid that this is very difficult to say without knowing more about your system. Basically, the accept plugin checks whether a few preconditions are satisfied and only then adds the button (the accept status must be present, your name must be present in the assignee combo and the issue must not be closed). This can be also seen in the accept_helper.rb, starting from line 30: https://github.com/stefanzugal/accept-plugin/blob/master/app/helpers/accept_helper.rb

Could you please verify whether these conditions are satisfied in your installation? (as described in my post from the 15th of september)

janekska commented 8 years ago

Ah, I got the idea and checked - it works. I need the exact status named "Accept"

2016-10-11 22:25 GMT+03:00 stefanzugal notifications@github.com:

I am afraid that this is very difficult to say without knowing more about your system. Basically, the accept plugin checks whether a few preconditions are satisfied and only then adds the button (the accept status must be present, your name must be present in the assignee combo and the issue must not be closed). This can be also seen in the accept_helper.rb, starting from line 30: https://github.com/stefanzugal/accept-plugin/blob/master/app/helpers/ accept_helper.rb

Could you please verify whether these conditions are satisfied in your installation? (as described in my post from the 15th of september)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/stefanzugal/accept-plugin/issues/10#issuecomment-253018635, or mute the thread https://github.com/notifications/unsubscribe-auth/AGwuYJUxl0iBa_9gosJ3G7TylftXjnthks5qy-KWgaJpZM4J8rBn .

stefanzugal commented 8 years ago

Great, glad to see it works.