HugoHasenbein / redmine_auto_resubmission

Redmine plugin to resubmit / follow up (German: "Wiedervorlage") an issue after it has been put away.
https://www.redmine.org/plugins/redmine_auto_resubmission
GNU General Public License v2.0
11 stars 4 forks source link

Regresseion since Redmine 4.x #2

Closed christianlupus closed 4 years ago

christianlupus commented 4 years ago

After the changes introduced to solve #1 there is still a problem there:

The resubmission business logic is no longer working under redmine 4.x. The resubmission is successfully triggered (and therefore mails are generated and a comment is added to the issue). However, the date of the resubmission is not shifted. As a result, even if the resubmission rule dictates a weekly or monthly period, every day the resubmission is triggered.

The same happens by the way also in the settings of the plugin where you can test various types of resubmission rules. As long as the date field is empty it works as expected. As soon as the date field is set, it is completely ignored. As if only the resubmission rule was given.

I remember that you could skip through the days/weeks/months simply by repeatedly clicking on test resubmission (only know the German translation).

@HugoHasenbein I assume this is just a minor change you added. Maybe in this line. I do not unserstand much of the plugin nor do I know much of ruby but this function looks suspicious to me as well. You first select all "overdue" resubmission issues (ok) and on each of them and create a journal for each of them. In the previous code (5b0287f) there was some code to update the resubmission date etc as far as I understand.

HugoHasenbein commented 4 years ago

I assume, you speak German? if, so we can continue in German.

The resubmission logic quits shifting the date, once the date is a future date. So if you start with an empty field, "today" is assumed for the start date. As after one date calculation the date lies in the future, the date calculation stops. If you use the force modifier, i.e. M01! the calculation will be forced and continue. Else, you may start test resubmission with a date far in the past.

You say the issue date is not updated on a resubmission? The updating of the fields happens through a call back in this line

https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/redmine_auto_resubmission_lib.rb#L51 https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/redmine_auto_resubmission_lib.rb#L51

a simple issue.save calls update_date_fields , defined here:

https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/patches/issue_patch.rb#L41 https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/patches/issue_patch.rb#L41

The plugin runs in my environment well. So it will be a little challenge to identify the culprit.

Can you start by testing resubmissions with past dates?

Am 15.01.2020 um 21:55 schrieb Christian notifications@github.com:

After the changes introduced to solve #1 https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/1 there is still a problem there:

The resubmission business logic is no longer working under redmine 4.x. The resubmission is successfully triggered (and therefore mails are generated and a comment is added to the issue). However, the date of the resubmission is not shifted. As a result, even if the resubmission rule dictates a weekly or monthly period, every day the resubmission is triggered.

The same happens by the way also in the settings of the plugin where you can test various types of resubmission rules. As long as the date field is empty it works as expected. As soon as the date field is set, it is completely ignored. As if only the resubmission rule was given.

I remember that you could skip through the days/weeks/months simply by repeatedly clicking on test resubmission (only know the German translation).

@HugoHasenbein https://github.com/HugoHasenbein I assume this is just a minor change you added. Maybe in this line https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/app/controllers/resubmissions_controller.rb#L31. I do not unserstand much of the plugin nor do I know much of ruby but this function https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/redmine_auto_resubmission_lib.rb#L24 looks suspicious to me as well. You first select all "overdue" resubmission issues (ok) and on each of them and create a journal for each of them. In the previous code (5b0287f https://github.com/HugoHasenbein/redmine_auto_resubmission/commit/03b51a2a1788761e91a4c733cbc34c6ad6258b2e) there was some code to update the resubmission date etc as far as I understand.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/2?email_source=notifications&email_token=AJWRDRFIJQZBHS6KN536PSTQ55Z45A5CNFSM4KHJYGH2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IGO2A2A, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRAGELDZIY4PJTFJ3LTQ55Z45ANCNFSM4KHJYGHQ.

christianlupus commented 4 years ago

I assume, you speak German? if, so we can continue in German.

Ja, mir ist beides recht ;)

The resubmission logic quits shifting the date, once the date is a future date. So if you start with an empty field, "today" is assumed for the start date. As after one date calculation the date lies in the future, the date calculation stops. If you use the force modifier, i.e. M01! the calculation will be forced and continue. Else, you may start test resubmission with a date far in the past.

You say the issue date is not updated on a resubmission? The updating of the fields happens through a call back in this line https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/redmine_auto_resubmission_lib.rb#L51 a simple issue.save calls update_date_fields , defined here: https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/patches/issue_patch.rb#L41 The plugin runs in my environment well. So it will be a little challenge to identify the culprit.

Gibt es eine (relativ) einfache Möglichkeit, einen Log oder eine Debug-Session zu öffnen? Ich kenne mich halt mit Ruby gar nicht aus.

Im Moment verwende ich eine Docker-basierte Lösung. Da kann ich zu Testzwecken jederzeit die Konfiguration weitergeben, wenn das helfen sollte.

Can you start by testing resubmissions with past dates? Ich habe einmal ein Video erstellt, damit klar ist, was genau (nicht) passiert auf der Weboberfläche: https://youtu.be/kd7sDGuKSRo Das Video wurde heute erstellt, also am 16.01.2020.

HugoHasenbein commented 4 years ago

Hallo Christian,

man kann im redmine-Verzeichnis mit 'tail -f log/production.log' alle infos der log-Datei ausgeben lassen. Das Plugin ist selbst allerdings recht still.

Um zu prüfen, was bei der Berechnung des neuen Wiedervorlage-Datum passiert, kann man auch folgendes machen:

In

https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/patches/issue_patch.rb#L54 https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/patches/issue_patch.rb#L54

einfügen: Rails.logger.info http://rails.logger.info/ "#{new_date} #{new_rule}"

An dieser Stelle ist die Logik, dass das Ticket nicht angefasst wird, wenn kein Datum vorhanden ist. Vielelleicht ist das schon das Problem. Nutzt Du das Plugin so, dass Du im Ticket das Datum-Feld leer lässt und nur eine WV-Regel einsetzt? Das wäre naheliegend. Man hat ein Ticket, möchte es in zwei Wochen wiedersehen, aber sich keine Gedanken um ein Datum machen.

Viele Grüße

Stephan

Am 16.01.2020 um 11:16 schrieb Christian notifications@github.com:

I assume, you speak German? if, so we can continue in German.

Ja, mir ist beides recht ;)

The resubmission logic quits shifting the date, once the date is a future date. So if you start with an empty field, "today" is assumed for the start date. As after one date calculation the date lies in the future, the date calculation stops. If you use the force modifier, i.e. M01! the calculation will be forced and continue. Else, you may start test resubmission with a date far in the past.

You say the issue date is not updated on a resubmission? The updating of the fields happens through a call back in this line https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/redmine_auto_resubmission_lib.rb#L51 https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/redmine_auto_resubmission_lib.rb#L51 a simple issue.save calls update_date_fields , defined here: https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/patches/issue_patch.rb#L41 https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/patches/issue_patch.rb#L41 The plugin runs in my environment well. So it will be a little challenge to identify the culprit.

Gibt es eine (relativ) einfache Möglichkeit, einen Log oder eine Debug-Session zu öffnen? Ich kenne mich halt mit Ruby gar nicht aus.

Im Moment verwende ich eine Docker-basierte Lösung. Da kann ich zu Testzwecken jederzeit die Konfiguration weitergeben, wenn das helfen sollte.

Can you start by testing resubmissions with past dates? Ich habe einmal ein Video erstellt, damit klar ist, was genau (nicht) passiert auf der Weboberfläche: https://youtu.be/kd7sDGuKSRo https://youtu.be/kd7sDGuKSRo Das Video wurde heute erstellt, also am 16.01.2020.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/2?email_source=notifications&email_token=AJWRDRBXM7DOY5VKSZIZWD3Q6AXW5A5CNFSM4KHJYGH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJDQ6XY#issuecomment-575082335, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRHSWG7SHKJPUL4KNITQ6AXW5ANCNFSM4KHJYGHQ.

christianlupus commented 4 years ago

Hallo Stephan,

man kann im redmine-Verzeichnis mit 'tail -f log/production.log' alle infos der log-Datei ausgeben lassen. Das Plugin ist selbst allerdings recht still.

Jop, das habe ich eben gesehen.

Um zu prüfen, was bei der Berechnung des neuen Wiedervorlage-Datum passiert, kann man auch folgendes machen: In https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/patches/issue_patch.rb#L54 einfügen:

Rails.logger.info "#{new_date} #{new_rule}"

Genau so was wollte ich eben auch machen (allerdings in eine temporäre Datei, weil ich den Befehlt nicht kannte). Dummerweise funktioniert das im Moment nicht so. Ich habe nun alle Widervorlagen manuell vorgestellt, damit das Plugin nichts "machen muss" (korrekterweise), wenn ich auf Neu berechnen klicke. Dann habe ich einen Testfall erstellt (Datum 2 Wochen in der Vergangenheit und Regel D1X). Wenn ich nun die Regeln neu berechnen lasse (aus der Plugin-Konfiguration), wird an dem Issue zwar ein Eintrag in der History angehängt, aber die Daten nicht verändert. Interessanterweise wird aber auf dem Logger auch nichts ausgegeben von dem, was ich da einprogrammiert habe. Ich muss bei Ruby ja nicht neu kompilieren oder so, damit die Änderungen aktiv werden?

Ich werde wohl mal einen Fork des Projekts machen und dann meine Änderungen zum Debuggen da aufzeichnen. Dann reden wir auch immer vom selben. Code

An dieser Stelle ist die Logik, dass das Ticket nicht angefasst wird, wenn kein Datum vorhanden ist. Vielelleicht ist das schon das Problem. Nutzt Du das Plugin so, dass Du im Ticket das Datum-Feld leer lässt und nur eine WV-Regel einsetzt? Das wäre naheliegend. Man hat ein Ticket, möchte es in zwei Wochen wiedersehen, aber sich keine Gedanken um ein Datum machen.

Normalerweise habe ich folgenden Fälle für das Plugin:

  1. Ich brauche zu einem bestimmten Datum eine Erinnerung. Dann lege ich nur das Datum fest und lasse die Regel leer. Nach dem Auslösen wurde dann das Datum auf leer zurück gesetzt und ich konnte manuell ggf neu eintragen.
  2. Ich brauche eine wiederkehrende Erinnerung ab sofort. Dann lege ich einfach nur eine Regel an, das Datumsfeld hatte ich bisher immer leer gelassen. Das wurde sonst immer automatisch ausgefüllt.
  3. Ich brauche eine wiederkehrende Erinnerung ab einem Datum. Dann lege ich das Datum auf das erste Datum der Erinnerung fest und die Regel auf die Wiederholungsregel (z.B. W1X).
HugoHasenbein commented 4 years ago

OK, dann ist das Problem erkannt:

ändere diese Zeile

https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/patches/issue_patch.rb#L51 https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/patches/issue_patch.rb#L51

so

if resubmission_rule && resubmission_dat

und es sollte funktionieren

Am 16.01.2020 um 12:15 schrieb Christian notifications@github.com:

Hallo Stephan,

man kann im redmine-Verzeichnis mit 'tail -f log/production.log' alle infos der log-Datei ausgeben lassen. Das Plugin ist selbst allerdings recht still.

Jop, das habe ich eben gesehen.

Um zu prüfen, was bei der Berechnung des neuen Wiedervorlage-Datum passiert, kann man auch folgendes machen: In https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/patches/issue_patch.rb#L54 https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/patches/issue_patch.rb#L54 einfügen:

Rails.logger.info "#{new_date} #{new_rule}" Genau so was wollte ich eben auch machen (allerdings in eine temporäre Datei, weil ich den Befehlt nicht kannte). Dummerweise funktioniert das im Moment nicht so. Ich habe nun alle Widervorlagen manuell vorgestellt, damit das Plugin nichts "machen muss" (korrekterweise), wenn ich auf Neu berechnen klicke. Dann habe ich einen Testfall erstellt (Datum 2 Wochen in der Vergangenheit und Regel D1X). Wenn ich nun die Regeln neu berechnen lasse (aus der Plugin-Konfiguration), wird an dem Issue zwar ein Eintrag in der History angehängt, aber die Daten nicht verändert. Interessanterweise wird aber auf dem Logger auch nichts ausgegeben von dem, was ich da einprogrammiert habe. Ich muss bei Ruby ja nicht neu kompilieren oder so, damit die Änderungen aktiv werden?

Ich werde wohl mal einen Fork des Projekts machen und dann meine Änderungen zum Debuggen da aufzeichnen. Dann reden wir auch immer vom selben. Code

An dieser Stelle ist die Logik, dass das Ticket nicht angefasst wird, wenn kein Datum vorhanden ist. Vielelleicht ist das schon das Problem. Nutzt Du das Plugin so, dass Du im Ticket das Datum-Feld leer lässt und nur eine WV-Regel einsetzt? Das wäre naheliegend. Man hat ein Ticket, möchte es in zwei Wochen wiedersehen, aber sich keine Gedanken um ein Datum machen.

Normalerweise habe ich folgenden Fälle für das Plugin:

Ich brauche zu einem bestimmten Datum eine Erinnerung. Dann lege ich nur das Datum fest und lasse die Regel leer. Nach dem Auslösen wurde dann das Datum auf leer zurück gesetzt und ich konnte manuell ggf neu eintragen. Ich brauche eine wiederkehrende Erinnerung ab sofort. Dann lege ich einfach nur eine Regel an, das Datumsfeld hatte ich bisher immer leer gelassen. Das wurde sonst immer automatisch ausgefüllt. Ich brauche eine wiederkehrende Erinnerung ab einem Datum. Dann lege ich das Datum auf das erste Datum der Erinnerung fest und die Regel auf die Wiederholungsregel (z.B. W1X). — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/2?email_source=notifications&email_token=AJWRDRA3PHIOLCKJN7BMLLTQ6A6WNA5CNFSM4KHJYGH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJDWQXA#issuecomment-575105116, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRGZJHTPUDHGXGSWOO3Q6A6WNANCNFSM4KHJYGHQ.

christianlupus commented 4 years ago

Wenn ich die Neuberechnung auslöse, bekomme ich mit dem aktuellen Stand folgenden Log:

app_1  | App 132 output: I, [2020-01-16T11:25:21.477252 #132]  INFO -- : Started GET "/calc_resubmissions" for 134.96.120.226 at 2020-01-16 11:25:21 +0000
app_1  | App 132 output: I, [2020-01-16T11:25:21.479430 #132]  INFO -- : Processing by ResubmissionsController#calc_resubmissions as HTML
app_1  | App 132 output: I, [2020-01-16T11:25:21.479585 #132]  INFO -- :   Parameters: {"authenticity_token"=>"y+HJvdLIBviiMjp+igTgS2FOkwyR/12XU7we15PhMoBYAlfbHYb7A8YBklKd/yBAdwcyRg5hJXbBIqrByQKtvQ=="}
app_1  | App 132 output: I, [2020-01-16T11:25:21.578845 #132]  INFO -- :   Current user: christian (id=1)
app_1  | App 132 output: I, [2020-01-16T11:25:21.638531 #132]  INFO -- : Mark1 (calc_all_resubmission_dates)
app_1  | App 132 output: I, [2020-01-16T11:25:21.703978 #132]  INFO -- : Mark2 (calc_all_resubmission_dates)
app_1  | App 132 output: I, [2020-01-16T11:25:21.822910 #132]  INFO -- : Enqueued ActionMailer::DeliveryJob (Job ID: ae3fc4f9-a2ed-48c8-8259-7dd85021dd4f) to Async(mailers) with arguments: "Mailer", "issue_edit", "deliver_now", #<GlobalID:0x000055e3b0737b68 @uri=#<URI::GID gid://redmine-app/User/1>>, #<GlobalID:0x000055e3b07419b0 @uri=#<URI::GID gid://redmine-app/Journal/2507>>
app_1  | App 132 output: I, [2020-01-16T11:25:21.823859 #132]  INFO -- : Mark3 (calc_all_resubmission_dates)
app_1  | App 132 output: I, [2020-01-16T11:25:21.828846 #132]  INFO -- : Performing ActionMailer::DeliveryJob (Job ID: ae3fc4f9-a2ed-48c8-8259-7dd85021dd4f) from Async(mailers) with arguments: "Mailer", "issue_edit", "deliver_now", #<GlobalID:0x000055e3b09dd1d8 @uri=#<URI::GID gid://redmine-app/User/1>>, #<GlobalID:0x000055e3b0a06df8 @uri=#<URI::GID gid://redmine-app/Journal/2507>>
app_1  | App 132 output: I, [2020-01-16T11:25:21.850704 #132]  INFO -- :   Rendering mailer/issue_edit.text.erb within layouts/mailer
app_1  | App 132 output: I, [2020-01-16T11:25:21.854302 #132]  INFO -- : Redirected to https://redmine.wolf-stuttgart.net/settings/plugin/redmine_auto_resubmission
app_1  | App 132 output: I, [2020-01-16T11:25:21.856458 #132]  INFO -- : Completed 302 Found in 377ms (ActiveRecord: 172.8ms)

Ich werde mal noch ein wenig mehr Debug-Ausgabe erzeugen. Mal schauen, ob ich es finde...

HugoHasenbein commented 4 years ago

klingt richtig - hast Du denn derzeit Tickets mit leerem Datum? Die werden weiterhin ignoriert, es sei, das Tickets wird manuell gespeichert nach der von mir vorgeschlagenen Änderung

Am 16.01.2020 um 12:31 schrieb Christian notifications@github.com:

Wenn ich die Neuberechnung auslöse, bekomme ich mit dem aktuellen Stand https://github.com/christianlupus/redmine_auto_resubmission/commit/1d53ea83980b0429d720eb3fa325c149b0d94873 folgenden Log:

app_1 | App 132 output: I, [2020-01-16T11:25:21.477252 #132] INFO -- : Started GET "/calc_resubmissions" for 134.96.120.226 at 2020-01-16 11:25:21 +0000 app_1 | App 132 output: I, [2020-01-16T11:25:21.479430 #132] INFO -- : Processing by ResubmissionsController#calc_resubmissions as HTML app_1 | App 132 output: I, [2020-01-16T11:25:21.479585 #132] INFO -- : Parameters: {"authenticity_token"=>"y+HJvdLIBviiMjp+igTgS2FOkwyR/12XU7we15PhMoBYAlfbHYb7A8YBklKd/yBAdwcyRg5hJXbBIqrByQKtvQ=="} app_1 | App 132 output: I, [2020-01-16T11:25:21.578845 #132] INFO -- : Current user: christian (id=1) app_1 | App 132 output: I, [2020-01-16T11:25:21.638531 #132] INFO -- : Mark1 (calc_all_resubmission_dates) app_1 | App 132 output: I, [2020-01-16T11:25:21.703978 #132] INFO -- : Mark2 (calc_all_resubmission_dates) app_1 | App 132 output: I, [2020-01-16T11:25:21.822910 #132] INFO -- : Enqueued ActionMailer::DeliveryJob (Job ID: ae3fc4f9-a2ed-48c8-8259-7dd85021dd4f) to Async(mailers) with arguments: "Mailer", "issue_edit", "deliver_now", #<GlobalID:0x000055e3b0737b68 @uri=#<URI::GID gid://redmine-app/User/1>>, #<GlobalID:0x000055e3b07419b0 @uri=#<URI::GID gid://redmine-app/Journal/2507>> app_1 | App 132 output: I, [2020-01-16T11:25:21.823859 #132] INFO -- : Mark3 (calc_all_resubmission_dates) app_1 | App 132 output: I, [2020-01-16T11:25:21.828846 #132] INFO -- : Performing ActionMailer::DeliveryJob (Job ID: ae3fc4f9-a2ed-48c8-8259-7dd85021dd4f) from Async(mailers) with arguments: "Mailer", "issue_edit", "deliver_now", #<GlobalID:0x000055e3b09dd1d8 @uri=#<URI::GID gid://redmine-app/User/1>>, #<GlobalID:0x000055e3b0a06df8 @uri=#<URI::GID gid://redmine-app/Journal/2507>> app_1 | App 132 output: I, [2020-01-16T11:25:21.850704 #132] INFO -- : Rendering mailer/issue_edit.text.erb within layouts/mailer app_1 | App 132 output: I, [2020-01-16T11:25:21.854302 #132] INFO -- : Redirected to https://redmine.wolf-stuttgart.net/settings/plugin/redmine_auto_resubmission app_1 | App 132 output: I, [2020-01-16T11:25:21.856458 #132] INFO -- : Completed 302 Found in 377ms (ActiveRecord: 172.8ms) Ich werde mal noch ein wenig mehr Debug-Ausgabe erzeugen. Mal schauen, ob ich es finde...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/2?email_source=notifications&email_token=AJWRDRA7AUWSTEYOYDRBFCLQ6BAQ7A5CNFSM4KHJYGH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJDXZRY#issuecomment-575110343, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRHKIPC7GHOTSOMDANTQ6BAQ7ANCNFSM4KHJYGHQ.

christianlupus commented 4 years ago

klingt richtig - hast Du denn derzeit Tickets mit leerem Datum? Die werden weiterhin ignoriert, es sei, das Tickets wird manuell gespeichert nach der von mir vorgeschlagenen Änderung

Im Moment gibt es zwar viele Tickets mit leerem Datum aber keine mit Regel. Also keine, die das Plugin betreffen. Ich habe bewusst mich auf ein einzelnes Ticket als Testfall konzentriert. Screenshot_20200116_123723

Ich finde, dass das nicht so richtig klingt. Weder diese Zeile noch diese Zeile führen zu Ausgaben auf dem Log.

christianlupus commented 4 years ago

OK, dann ist das Problem erkannt: ändere diese Zeile https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/patches/issue_patch.rb#L51 so

if resubmission_rule && resubmission_dat

und es sollte funktionieren

Also nur das e am Ende weg lassen oder wie? Ist das dann überhaupt noch richtig definiert?

HugoHasenbein commented 4 years ago

ich hatte die EMail mit durchstreichen formatiert - sie ist wohl falsch bei Dir angekommen

so muss es lauten:

--- if resubmission_rule && resubmission_date +++ if resubmission_rule

also das "&& resubmission_date" löschen

Am 16.01.2020 um 12:54 schrieb Christian notifications@github.com:

OK, dann ist das Problem erkannt: ändere diese Zeile https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/patches/issue_patch.rb#L51 https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/1e21328deb83992f78716fe538cab97463afc75d/lib/redmine_auto_resubmission/patches/issue_patch.rb#L51 so

if resubmission_rule && resubmission_dat und es sollte funktionieren

Also nur das e am Ende weg lassen oder wie? Ist das dann überhaupt noch richtig definiert?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/2?email_source=notifications&email_token=AJWRDRAS3HSCTR7HVRN2F3LQ6BDFRA5CNFSM4KHJYGH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJDZVOY#issuecomment-575118011, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRA3BQYINAA4QE5CDIDQ6BDFRANCNFSM4KHJYGHQ.

christianlupus commented 4 years ago

Ich hab's mal so eingegeben, aber es war zu erwarten, dass nicht viel passieren würde:

app_1  | App 150 output: I, [2020-01-16T12:30:43.205960 #150]  INFO -- : Started GET "/calc_resubmissions" for 134.96.120.226 at 2020-01-16 12:30:43 +0000
app_1  | App 150 output: I, [2020-01-16T12:30:43.209177 #150]  INFO -- : Processing by ResubmissionsController#calc_resubmissions as HTML
app_1  | App 150 output: I, [2020-01-16T12:30:43.209313 #150]  INFO -- :   Parameters: {"authenticity_token"=>"GGkVPQ4+dWBL33Da8Kuqx79h1jkvvW2bfH5/qzrfdVCLiotbwXCImy/s2PbnUGrMqSh3c7AjFXru4Mu9YDzqbQ=="}
app_1  | App 132 output: I, [2020-01-16T12:30:43.218498 #132]  INFO -- :   Rendered plugins/redmine_shortcuts/app/views/hooks/_view_layouts_base_html_head.html.erb (2.3ms)
app_1  | App 132 output: I, [2020-01-16T12:30:43.229636 #132]  INFO -- :   Rendered plugins/redmine_drawio/app/views/redmine_drawio/_macro_dialog.html.erb (0.7ms)
app_1  | App 132 output: I, [2020-01-16T12:30:43.232582 #132]  INFO -- :   Rendered plugins/redmine_shortcuts/app/views/hooks/_view_layouts_base_body_bottom.html.erb (1.7ms)
app_1  | App 132 output: I, [2020-01-16T12:30:43.232958 #132]  INFO -- : Completed 200 OK in 197ms (Views: 50.9ms | ActiveRecord: 22.1ms)
app_1  | App 150 output: I, [2020-01-16T12:30:43.308034 #150]  INFO -- :   Current user: christian (id=1)
app_1  | App 150 output: I, [2020-01-16T12:30:43.402096 #150]  INFO -- : Mark1 (calc_all_resubmission_dates)
app_1  | App 150 output: I, [2020-01-16T12:30:43.486621 #150]  INFO -- : Mark2 (calc_all_resubmission_dates)
app_1  | App 150 output: I, [2020-01-16T12:30:43.559011 #150]  INFO -- : Enqueued ActionMailer::DeliveryJob (Job ID: e12f2261-651e-4cab-8cd9-1ea5aff714b2) to Async(mailers) with arguments: "Mailer", "issue_edit", "deliver_now", #<GlobalID:0x000055b3aef4c470 @uri=#<URI::GID gid://redmine-app/User/1>>, #<GlobalID:0x000055b3aef539a0 @uri=#<URI::GID gid://redmine-app/Journal/2510>>
app_1  | App 150 output: I, [2020-01-16T12:30:43.560002 #150]  INFO -- : Mark3 (calc_all_resubmission_dates)
app_1  | App 150 output: I, [2020-01-16T12:30:43.567267 #150]  INFO -- : Performing ActionMailer::DeliveryJob (Job ID: e12f2261-651e-4cab-8cd9-1ea5aff714b2) from Async(mailers) with arguments: "Mailer", "issue_edit", "deliver_now", #<GlobalID:0x000055b3aef7f730 @uri=#<URI::GID gid://redmine-app/User/1>>, #<GlobalID:0x000055b3aef7ed30 @uri=#<URI::GID gid://redmine-app/Journal/2510>>
app_1  | App 150 output: I, [2020-01-16T12:30:43.587706 #150]  INFO -- : Redirected to https://redmine.wolf-stuttgart.net/settings/plugin/redmine_auto_resubmission
app_1  | App 150 output: I, [2020-01-16T12:30:43.588130 #150]  INFO -- : Completed 302 Found in 379ms (ActiveRecord: 160.0ms)

Es scheint mir so, als würde die update_date_fields Function nicht aufgerufen werden. Da hatte ich ja auch noch eine Debug-Ausgabe eingefügt, die aber nicht ausgelöst wird. Meine Vermutung ist, dass das Registrieren in https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/2b9f57311fd901aac7351310c0c481130eb803d1/lib/redmine_auto_resubmission/patches/issue_patch.rb#L22-L33 aus irgendwelchen Gründen nicht richtig funktioniert.

HugoHasenbein commented 4 years ago

dann probiere bitte folgendes:

in der Kommandozeile im redmine root dir:

rails console -e production

2.4.0 :000 > Issue.instance_methods.include?(:update_date_fields)

das sollte ein true ergeben

Am 16.01.2020 um 13:41 schrieb Christian notifications@github.com:

Ich hab's mal so eingegeben, aber es war zu erwarten, dass nicht viel passieren würde:

app_1 | App 150 output: I, [2020-01-16T12:30:43.205960 #150] INFO -- : Started GET "/calc_resubmissions" for 134.96.120.226 at 2020-01-16 12:30:43 +0000 app_1 | App 150 output: I, [2020-01-16T12:30:43.209177 #150] INFO -- : Processing by ResubmissionsController#calc_resubmissions as HTML app_1 | App 150 output: I, [2020-01-16T12:30:43.209313 #150] INFO -- : Parameters: {"authenticity_token"=>"GGkVPQ4+dWBL33Da8Kuqx79h1jkvvW2bfH5/qzrfdVCLiotbwXCImy/s2PbnUGrMqSh3c7AjFXru4Mu9YDzqbQ=="} app_1 | App 132 output: I, [2020-01-16T12:30:43.218498 #132] INFO -- : Rendered plugins/redmine_shortcuts/app/views/hooks/_view_layouts_base_html_head.html.erb (2.3ms) app_1 | App 132 output: I, [2020-01-16T12:30:43.229636 #132] INFO -- : Rendered plugins/redmine_drawio/app/views/redmine_drawio/_macro_dialog.html.erb (0.7ms) app_1 | App 132 output: I, [2020-01-16T12:30:43.232582 #132] INFO -- : Rendered plugins/redmine_shortcuts/app/views/hooks/_view_layouts_base_body_bottom.html.erb (1.7ms) app_1 | App 132 output: I, [2020-01-16T12:30:43.232958 #132] INFO -- : Completed 200 OK in 197ms (Views: 50.9ms | ActiveRecord: 22.1ms) app_1 | App 150 output: I, [2020-01-16T12:30:43.308034 #150] INFO -- : Current user: christian (id=1) app_1 | App 150 output: I, [2020-01-16T12:30:43.402096 #150] INFO -- : Mark1 (calc_all_resubmission_dates) app_1 | App 150 output: I, [2020-01-16T12:30:43.486621 #150] INFO -- : Mark2 (calc_all_resubmission_dates) app_1 | App 150 output: I, [2020-01-16T12:30:43.559011 #150] INFO -- : Enqueued ActionMailer::DeliveryJob (Job ID: e12f2261-651e-4cab-8cd9-1ea5aff714b2) to Async(mailers) with arguments: "Mailer", "issue_edit", "deliver_now", #<GlobalID:0x000055b3aef4c470 @uri=#<URI::GID gid://redmine-app/User/1>>, #<GlobalID:0x000055b3aef539a0 @uri=#<URI::GID gid://redmine-app/Journal/2510>> app_1 | App 150 output: I, [2020-01-16T12:30:43.560002 #150] INFO -- : Mark3 (calc_all_resubmission_dates) app_1 | App 150 output: I, [2020-01-16T12:30:43.567267 #150] INFO -- : Performing ActionMailer::DeliveryJob (Job ID: e12f2261-651e-4cab-8cd9-1ea5aff714b2) from Async(mailers) with arguments: "Mailer", "issue_edit", "deliver_now", #<GlobalID:0x000055b3aef7f730 @uri=#<URI::GID gid://redmine-app/User/1>>, #<GlobalID:0x000055b3aef7ed30 @uri=#<URI::GID gid://redmine-app/Journal/2510>> app_1 | App 150 output: I, [2020-01-16T12:30:43.587706 #150] INFO -- : Redirected to https://redmine.wolf-stuttgart.net/settings/plugin/redmine_auto_resubmission app_1 | App 150 output: I, [2020-01-16T12:30:43.588130 #150] INFO -- : Completed 302 Found in 379ms (ActiveRecord: 160.0ms) Es scheint mir so, als würde die update_date_fields Function nicht aufgerufen werden. Da hatte ich ja auch noch eine Debug-Ausgabe eingefügt, die aber nicht ausgelöst wird. Meine Vermutung ist, dass das Registrieren in https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/2b9f57311fd901aac7351310c0c481130eb803d1/lib/redmine_auto_resubmission/patches/issue_patch.rb#L22-L33 https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/2b9f57311fd901aac7351310c0c481130eb803d1/lib/redmine_auto_resubmission/patches/issue_patch.rb#L22-L33 aus irgendwelchen Gründen nicht richtig funktioniert.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/2?email_source=notifications&email_token=AJWRDRBF2GLSWH77ZGM3HADQ6BIXLA5CNFSM4KHJYGH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJD5TNI#issuecomment-575134133, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRFEP6ERGXRMFDF2A2TQ6BIXLANCNFSM4KHJYGHQ.

christianlupus commented 4 years ago

Das tut es. Ergebnis ist true.

HugoHasenbein commented 4 years ago

dann ist die Funktion da. bitte, lasse das log mitlaufen uns speichere ein Ticket mit ausgefüllter WV-Regel "von Hand. Editiere also ein Ticket, indem Du irgendetwas änderst und klicke "Speichern"

Am 16.01.2020 um 13:58 schrieb Christian notifications@github.com:

Das tut es. Ergebnis ist true.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/2?email_source=notifications&email_token=AJWRDRFIHASUEJBGCEYL2YDQ6BKVXA5CNFSM4KHJYGH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJD66MI#issuecomment-575139633, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRCYKHLRT73SFTZK5WDQ6BKVXANCNFSM4KHJYGHQ.

christianlupus commented 4 years ago

Dann bekomme ich

app_1  | App 132 output: I, [2020-01-16T13:06:39.698823 #132]  INFO -- : Started PATCH "/issues/951" for 134.96.120.226 at 2020-01-16 13:06:39 +0000
app_1  | App 132 output: I, [2020-01-16T13:06:39.699707 #132]  INFO -- : Processing by IssuesController#update as HTML
app_1  | App 132 output: I, [2020-01-16T13:06:39.699805 #132]  INFO -- :   Parameters: {"utf8"=>"✓", "authenticity_token"=>"n/zIkjqMhRgeAMu62OymqgYuT1g/F0tmas48gnPEMGMMH1b09cJ443ozY5bPF2ahEGfuEqCJM4f4UIiUKSevXg==", "form_update_triggered_by"=>"", "issue"=>{"is_private"=>"0", "project_id"=>"5", "tracker_id"=>"1", "subject"=>"Testticket Sandbox Widervorlage", "description"=>"", "status_id"=>"1", "priority_id"=>"3", "assigned_to_id"=>"", "category_id"=>"", "fixed_version_id"=>"6", "parent_issue_id"=>"", "start_date"=>"", "due_date"=>"", "estimated_hours"=>"", "done_ratio"=>"0", "custom_field_values"=>{"1"=>"2020-01-02", "2"=>"D1X morgen"}, "notes"=>"", "private_notes"=>"0", "lock_version"=>"0"}, "was_default_status"=>"1", "time_entry"=>{"hours"=>"", "activity_id"=>"", "comments"=>""}, "last_journal_id"=>"2508", "commit"=>"OK", "next_issue_id"=>"134", "issue_position"=>"1", "issue_count"=>"6", "id"=>"951"}
app_1  | App 132 output: I, [2020-01-16T13:06:39.841395 #132]  INFO -- :   Current user: christian (id=1)
app_1  | App 132 output: I, [2020-01-16T13:06:39.944690 #132]  INFO -- : Mark1 (update_date_fields)
app_1  | App 132 output: I, [2020-01-16T13:06:39.947238 #132]  INFO -- : 2020-01-02 D1X morgen -> 2020-01-03 D1X morgen
app_1  | App 132 output: I, [2020-01-16T13:06:40.053366 #132]  INFO -- : Enqueued ActionMailer::DeliveryJob (Job ID: 5bd748a5-3ba7-49bd-8501-eae5388fe298) to Async(mailers) with arguments: "Mailer", "issue_edit", "deliver_now", #<GlobalID:0x00007f76a57dd318 @uri=#<URI::GID gid://redmine-app/User/1>>, #<GlobalID:0x00007f76a57dcaa8 @uri=#<URI::GID gid://redmine-app/Journal/2511>>
app_1  | App 132 output: I, [2020-01-16T13:06:40.054106 #132]  INFO -- : Redirected to http://redmine.wolf-stuttgart.net/issues/951?issue_count=6&issue_position=1&next_issue_id=134
app_1  | App 132 output: I, [2020-01-16T13:06:40.061482 #132]  INFO -- : Completed 302 Found in 362ms (ActiveRecord: 237.4ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.070297 #132]  INFO -- : Performing ActionMailer::DeliveryJob (Job ID: 5bd748a5-3ba7-49bd-8501-eae5388fe298) from Async(mailers) with arguments: "Mailer", "issue_edit", "deliver_now", #<GlobalID:0x00007f76a580ad90 @uri=#<URI::GID gid://redmine-app/User/1>>, #<GlobalID:0x00007f76a580a1b0 @uri=#<URI::GID gid://redmine-app/Journal/2511>>
app_1  | App 132 output: I, [2020-01-16T13:06:40.122168 #132]  INFO -- : Started GET "/issues/951?issue_count=6&issue_position=1&next_issue_id=134" for 134.96.120.226 at 2020-01-16 13:06:40 +0000
app_1  | App 132 output: I, [2020-01-16T13:06:40.126232 #132]  INFO -- : Processing by IssuesController#show as HTML
app_1  | App 132 output: I, [2020-01-16T13:06:40.126861 #132]  INFO -- :   Parameters: {"issue_count"=>"6", "issue_position"=>"1", "next_issue_id"=>"134", "id"=>"951"}
app_1  | App 132 output: I, [2020-01-16T13:06:40.250457 #132]  INFO -- :   Current user: christian (id=1)
app_1  | App 132 output: I, [2020-01-16T13:06:40.282750 #132]  INFO -- :   Rendering mailer/issue_edit.text.erb within layouts/mailer
app_1  | App 132 output: I, [2020-01-16T13:06:40.369051 #132]  INFO -- :   Rendered mailer/_issue.text.erb (55.3ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.369144 #132]  INFO -- :   Rendered mailer/issue_edit.text.erb within layouts/mailer (86.3ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.394894 #132]  INFO -- :   Rendering mailer/issue_edit.html.erb within layouts/mailer
app_1  | App 132 output: I, [2020-01-16T13:06:40.427149 #132]  INFO -- :   Rendered mailer/_issue.html.erb (1.9ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.427240 #132]  INFO -- :   Rendered mailer/issue_edit.html.erb within layouts/mailer (32.3ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.445437 #132]  INFO -- : Performed ActionMailer::DeliveryJob (Job ID: 5bd748a5-3ba7-49bd-8501-eae5388fe298) from Async(mailers) in 370.81ms
app_1  | App 132 output: I, [2020-01-16T13:06:40.445862 #132]  INFO -- :   Rendering issues/show.html.erb within layouts/base
app_1  | App 132 output: I, [2020-01-16T13:06:40.471196 #132]  INFO -- :   Rendered issues/_action_menu.html.erb (12.1ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.532130 #132]  INFO -- :   Rendered plugins/redmine_shortcuts/app/views/hooks/_view_issues_show_details_bottom.html.erb (4.3ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.557264 #132]  INFO -- :   Rendered issue_relations/_form.html.erb (6.7ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.557515 #132]  INFO -- :   Rendered issues/_relations.html.erb (15.7ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.621059 #132]  INFO -- :   Rendered issues/tabs/_history.html.erb (47.3ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.621244 #132]  INFO -- :   Rendered common/_tabs.html.erb (59.6ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.637442 #132]  INFO -- :   Rendered issues/_action_menu.html.erb (13.4ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.684936 #132]  INFO -- :   Rendered issues/_trackers_description.html.erb (1.3ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.746141 #132]  INFO -- :   Rendered issues/_form_custom_fields.html.erb (2.0ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.746427 #132]  INFO -- :   Rendered issues/_attributes.html.erb (32.0ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.761860 #132]  INFO -- :   Rendered plugins/redmine_mentions/app/views/hooks/redmine_mentions/_edit_mentionable.html.erb (14.3ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.762231 #132]  INFO -- :   Rendered issues/_form.html.erb (106.1ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.776772 #132]  INFO -- :   Rendered plugins/redmine_mentions/app/views/hooks/redmine_mentions/_edit_mentionable.html.erb (1.3ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.810202 #132]  INFO -- :   Rendered attachments/_form.html.erb (3.9ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.812158 #132]  INFO -- :   Rendered issues/_edit.html.erb (164.3ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.812246 #132]  INFO -- :   Rendered issues/_action_menu_edit.html.erb (188.8ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.817321 #132]  INFO -- :   Rendered issues/_sidebar.html.erb (2.8ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.833645 #132]  INFO -- :   Rendered watchers/_watchers.html.erb (4.3ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.834583 #132]  INFO -- :   Rendered issues/show.html.erb within layouts/base (387.0ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.838809 #132]  INFO -- :   Rendered plugins/redmine_shortcuts/app/views/hooks/_view_layouts_base_html_head.html.erb (0.2ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.868887 #132]  INFO -- :   Rendered plugins/redmine_drawio/app/views/redmine_drawio/_macro_dialog.html.erb (0.2ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.869617 #132]  INFO -- :   Rendered plugins/redmine_shortcuts/app/views/hooks/_view_layouts_base_body_bottom.html.erb (0.2ms)
app_1  | App 132 output: I, [2020-01-16T13:06:40.870138 #132]  INFO -- : Completed 200 OK in 743ms (Views: 385.9ms | ActiveRecord: 304.1ms)

Dabei ist die Zeile 2020-01-02 D1X morgen -> 2020-01-03 D1X morgen dabei.

HugoHasenbein commented 4 years ago

OK , das heißt, issue.save wird mit dem callback aufgerufen. Soweit schon einmal gut.

Ist das Problem jetzt, dass Du Tickets hast, die kein Datum tragen und bei calculate resubmissions werden diese Tickets ignoriert, richtig?

Am 16.01.2020 um 14:08 schrieb Christian notifications@github.com:

app_1 | App 132 output: I, [2020-01-16T13:06:39.947238 #132] INFO -- : 2020-01-02 D1X morgen -> 2020-01-03 D1X morgen

christianlupus commented 4 years ago

Nein, das stimmt so leider nicht. Ich habe ein Ticket mit beidem (Datum und Regel) gesetzt. Das Datum liegt weit in der Vergangenheit und die Regel sollte das Datum bei calculate resubmissions eigentlich auf einen aktuellen Wert setzen. Screenshot_20200116_144706 Praktisch wird das Datum aber nicht verändert. Soweit der Fehlerbericht aus Nutzer-Sicht.

HugoHasenbein commented 4 years ago

es ist, dass ich feedback bekomme, um das plugin "stressfest" zu machen. Lass mich den Code nochmals ansehen.....

Am 16.01.2020 um 14:52 schrieb Christian notifications@github.com:

Nein, das stimmt so leider nicht. Ich habe ein Ticket mit beidem (Datum und Regel) gesetzt. Das Datum liegt weit in der Vergangenheit und die Regel sollte das Datum bei calculate resubmissions eigentlich auf einen aktuellen Wert setzen. https://user-images.githubusercontent.com/8202922/72530190-1b5fa600-386f-11ea-9dbc-3151511f6262.png Praktisch wird das Datum aber nicht verändert. Soweit der Fehlerbericht aus Nutzer-Sicht.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/2?email_source=notifications&email_token=AJWRDRDSJ5ZT6ARSVW2LMQDQ6BRBBA5CNFSM4KHJYGH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJEEBXQ#issuecomment-575160542, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRBRO5ODYJIHB6DQAQ3Q6BRBBANCNFSM4KHJYGHQ.

christianlupus commented 4 years ago

Es ist so, dass die Funktion update_date_fields in issue_patch.rb nur genau dann aufgerufen wird, wenn ich manuell das Ticket speichere.

Wenn ich den Betch-Vorgang auslöse (egal ob aus den Einstellungen des Plugins heraus oder per rake redmine:resubmit:resubmit_issues), wird das Ticket zwar verändert, es wird jedoch nicht durch die Routinen geschickt, die in issue_patch.rb definiert sind.

HugoHasenbein commented 4 years ago

verstanden - ich suche gerade die Kaskade, die durchlaufen wird journal.save -> issue.save ... (etwas tricky, weil da vieles im Hintergrund durch Rails passiert)

Am 16.01.2020 um 15:00 schrieb Christian notifications@github.com:

Es ist so, dass die Funktion update_date_fields in issue_patch.rb https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/master/lib/redmine_auto_resubmission/patches/issue_patch.rb nur genau dann aufgerufen wird, wenn ich manuell das Ticket speichere.

Wenn ich den Betch-Vorgang auslöse (egal ob aus den Einstellungen des Plugins heraus oder per rake redmine:resubmit:resubmit_issues), wird das Ticket zwar verändert, es wird jedoch nicht durch die Routinen geschickt, die in issue_patch.rb https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/master/lib/redmine_auto_resubmission/patches/issue_patch.rb definiert sind.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/2?email_source=notifications&email_token=AJWRDRDQP6PN2WPADC22KU3Q6BR63A5CNFSM4KHJYGH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJEE3EQ#issuecomment-575163794, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRGZHOBEVKKQDY2WN53Q6BR63ANCNFSM4KHJYGHQ.

HugoHasenbein commented 4 years ago

Hallo Christian,

ich habe nun einiges geändert und auch etwas "eleganter" programmiert. Dabei sollte auch Dein Problem behoben worden sein. Tatsächlich ist in Rails 5 einiges geändert worden. Das müsste nun behoben sein. Ich habe das neue Plugin, Version 1.0.6, in meiner Umgebung getestet.

Ich habe noch die globale Option hinzugefügt "Nur offene Tickets wiedervorlegen"

Sag mir bescheid, ob es jetzt auch bei Dir läuft

Software ist nur gut, wenn sie einige Stresstests in verschiedenen Umgebungen bestanden hat - von daher kannst Du mich ruhig antickern, wenn etwas nicht läuft.

Viele Grüße

Stephan

Am 16.01.2020 um 15:00 schrieb Christian notifications@github.com:

Es ist so, dass die Funktion update_date_fields in issue_patch.rb https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/master/lib/redmine_auto_resubmission/patches/issue_patch.rb nur genau dann aufgerufen wird, wenn ich manuell das Ticket speichere.

Wenn ich den Betch-Vorgang auslöse (egal ob aus den Einstellungen des Plugins heraus oder per rake redmine:resubmit:resubmit_issues), wird das Ticket zwar verändert, es wird jedoch nicht durch die Routinen geschickt, die in issue_patch.rb https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/master/lib/redmine_auto_resubmission/patches/issue_patch.rb definiert sind.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/2?email_source=notifications&email_token=AJWRDRDQP6PN2WPADC22KU3Q6BR63A5CNFSM4KHJYGH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJEE3EQ#issuecomment-575163794, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRGZHOBEVKKQDY2WN53Q6BR63ANCNFSM4KHJYGHQ.

christianlupus commented 4 years ago

Hallo Stephan,

ich habe nun einiges geändert und auch etwas "eleganter" programmiert. Dabei sollte auch Dein Problem behoben worden sein. Tatsächlich ist in Rails 5 einiges geändert worden. Das müsste nun behoben sein. Ich habe das neue Plugin, Version 1.0.6, in meiner Umgebung getestet.

Top! Wenn es eleganter ist und damit leichter zu lesen/warten, perfekt. :+1:

Ich habe noch die globale Option hinzugefügt "Nur offene Tickets wiedervorlegen"

Das ist noch eine praktische Erweiterung. Ist mir schon ein paar mal passiert, dass ein altes Ticket dank der Erweiterung wieder "hoch" gekommen ist, wenn ich vergessen hatte die Regel zu löschen ;)

Sag mir bescheid, ob es jetzt auch bei Dir läuft

Software ist nur gut, wenn sie einige Stresstests in verschiedenen Umgebungen bestanden hat - von daher kannst Du mich ruhig antickern, wenn etwas nicht läuft.

Leider muss ich dich direkt wieder antickern. Allerdings wird es jetzt strange. Ich habe es auf meinem Produktiv-System installiert.

Eingehandelte Regression

Bei der Ausführung von `rake redmine:resubmit:resubmit_issues` bekomme ich folgende Ausgabe: ``` W, [2020-01-17T08:06:56.768373 #255] WARN -- : Creating scope :sorted. Overwriting existing method Group.sorted. W, [2020-01-17T08:06:56.777477 #255] WARN -- : Creating scope :sorted. Overwriting existing method User.sorted. W, [2020-01-17T08:06:58.124111 #255] WARN -- : Creating scope :system. Overwriting existing method Enumeration.system. I, [2020-01-17T08:06:58.163610 #255] INFO -- : Performing ActionMailer::DeliveryJob (Job ID: 6ab7227b-c982-4636-adbe-ecd9df9a18b7) from Inline(mailers) with arguments: "Mailer", "issue_edit", "deliver_now", #>, #> I, [2020-01-17T08:06:58.370675 #255] INFO -- : Rendering mailer/issue_edit.text.erb within layouts/mailer I, [2020-01-17T08:06:58.453602 #255] INFO -- : Rendered mailer/_issue.text.erb (79.2ms) I, [2020-01-17T08:06:58.453698 #255] INFO -- : Rendered mailer/issue_edit.text.erb within layouts/mailer (82.9ms) I, [2020-01-17T08:06:58.464734 #255] INFO -- : Rendering mailer/issue_edit.html.erb within layouts/mailer I, [2020-01-17T08:06:58.475484 #255] INFO -- : Rendered mailer/_issue.html.erb (2.4ms) I, [2020-01-17T08:06:58.475577 #255] INFO -- : Rendered mailer/issue_edit.html.erb within layouts/mailer (10.7ms) I, [2020-01-17T08:06:59.568182 #255] INFO -- : Performed ActionMailer::DeliveryJob (Job ID: 6ab7227b-c982-4636-adbe-ecd9df9a18b7) from Inline(mailers) in 1404.39ms I, [2020-01-17T08:06:59.569727 #255] INFO -- : Enqueued ActionMailer::DeliveryJob (Job ID: 6ab7227b-c982-4636-adbe-ecd9df9a18b7) to Inline(mailers) with arguments: "Mailer", "issue_edit", "deliver_now", #>, #> rake aborted! NoMethodError: undefined method `value' for nil:NilClass /usr/src/redmine/plugins/redmine_auto_resubmission/lib/redmine_auto_resubmission/patches/issue_patch.rb:62:in `update_date_fields' /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/callbacks.rb:426:in `block in make_lambda' /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting' /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/callbacks.rb:606:in `block (2 levels) in default_terminator' /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/callbacks.rb:605:in `catch' /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/callbacks.rb:605:in `block in default_terminator' /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/callbacks.rb:199:in `block in halting' /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/callbacks.rb:513:in `block in invoke_before' /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/callbacks.rb:513:in `each' /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/callbacks.rb:513:in `invoke_before' /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/callbacks.rb:131:in `run_callbacks' /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/callbacks.rb:816:in `_run_update_callbacks' /usr/local/bundle/gems/activerecord-5.2.4.1/lib/active_record/callbacks.rb:350:in `_update_record' /usr/local/bundle/gems/activerecord-5.2.4.1/lib/active_record/timestamp.rb:114:in `_update_record' /usr/local/bundle/gems/activerecord-5.2.4.1/lib/active_record/persistence.rb:705:in `create_or_update' /usr/local/bundle/gems/activerecord-5.2.4.1/lib/active_record/callbacks.rb:342:in `block in create_or_update' /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/callbacks.rb:132:in `run_callbacks' /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/callbacks.rb:816:in `_run_save_callbacks' /usr/local/bundle/gems/activerecord-5.2.4.1/lib/active_record/callbacks.rb:342:in `create_or_update' /usr/src/redmine/app/models/issue.rb:214:in `create_or_update' /usr/local/bundle/gems/activerecord-5.2.4.1/lib/active_record/persistence.rb:275:in `save' /usr/local/bundle/gems/activerecord-5.2.4.1/lib/active_record/validations.rb:46:in `save' /usr/local/bundle/gems/activerecord-5.2.4.1/lib/active_record/transactions.rb:310:in `block (2 levels) in save' /usr/local/bundle/gems/activerecord-5.2.4.1/lib/active_record/transactions.rb:387:in `block in with_transaction_returning_status' /usr/local/bundle/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `block in transaction' /usr/local/bundle/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction' /usr/local/bundle/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction' /usr/local/bundle/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `transaction' /usr/local/bundle/gems/activerecord-5.2.4.1/lib/active_record/transactions.rb:212:in `transaction' /usr/local/bundle/gems/activerecord-5.2.4.1/lib/active_record/transactions.rb:385:in `with_transaction_returning_status' /usr/local/bundle/gems/activerecord-5.2.4.1/lib/active_record/transactions.rb:310:in `block in save' /usr/local/bundle/gems/activerecord-5.2.4.1/lib/active_record/transactions.rb:325:in `rollback_active_record_state!' /usr/local/bundle/gems/activerecord-5.2.4.1/lib/active_record/transactions.rb:309:in `save' /usr/local/bundle/gems/activerecord-5.2.4.1/lib/active_record/suppressor.rb:44:in `save' /usr/src/redmine/plugins/redmine_auto_resubmission/lib/redmine_auto_resubmission/redmine_auto_resubmission_lib.rb:73:in `block in calc_all_resubmission_dates' /usr/src/redmine/plugins/redmine_auto_resubmission/lib/redmine_auto_resubmission/redmine_auto_resubmission_lib.rb:63:in `each' /usr/src/redmine/plugins/redmine_auto_resubmission/lib/redmine_auto_resubmission/redmine_auto_resubmission_lib.rb:63:in `calc_all_resubmission_dates' /usr/src/redmine/plugins/redmine_auto_resubmission/lib/tasks/resubmit.rake:16:in `block (3 levels) in ' /usr/local/bundle/gems/rake-13.0.1/exe/rake:27:in `' Tasks: TOP => redmine:resubmit:resubmit_issues (See full trace by running task with --trace) ```
Auf einem Testsystem bekomme ich hingegen diesen Log: ``` W, [2020-01-17T08:18:01.496674 #63] WARN -- : Creating scope :sorted. Overwriting existing method Group.sorted. W, [2020-01-17T08:18:01.504981 #63] WARN -- : Creating scope :sorted. Overwriting existing method User.sorted. W, [2020-01-17T08:18:02.596897 #63] WARN -- : Creating scope :system. Overwriting existing method Enumeration.system. I, [2020-01-17T08:18:02.657487 #63] INFO -- : Enqueued ActionMailer::DeliveryJob (Job ID: 123b479c-13f8-491d-8357-421e65351d6a) to Async(mailers) with arguments: "Mailer", "issue_edit", "deliver_now", #>, #> I, [2020-01-17T08:18:02.688576 #63] INFO -- : Performing ActionMailer::DeliveryJob (Job ID: 123b479c-13f8-491d-8357-421e65351d6a) from Async(mailers) with arguments: "Mailer", "issue_edit", "deliver_now", #>, #> I, [2020-01-17T08:18:02.732316 #63] INFO -- : Performed ActionMailer::DeliveryJob (Job ID: 123b479c-13f8-491d-8357-421e65351d6a) from Async(mailers) in 43.6ms ```

Es ist jedoch klar, dass auf dem Produktiv-System weit mehr Tickets sind, weshalb ich natürlich nicht sagen kann, ob nicht ein anderes Ticket das Problem auslöst. Eine kurze Recherche lässt das aber vermuten. Wenn ich folgende Änderungen einbringe, bekomme ich auch auf dem Produktiv-System keine Fehler mehr.

Log bei angepasstem Produktiv-System ``` W, [2020-01-17T08:29:22.754960 #863] WARN -- : Creating scope :sorted. Overwriting existing method Group.sorted. W, [2020-01-17T08:29:22.764256 #863] WARN -- : Creating scope :sorted. Overwriting existing method User.sorted. W, [2020-01-17T08:29:24.080583 #863] WARN -- : Creating scope :system. Overwriting existing method Enumeration.system. I, [2020-01-17T08:29:24.121223 #863] INFO -- : Performing ActionMailer::DeliveryJob (Job ID: 697a18e7-af06-4a2b-938a-d8fa6584d333) from Inline(mailers) with arguments: "Mailer", "issue_edit", "deliver_now", #>, #> I, [2020-01-17T08:29:24.319962 #863] INFO -- : Rendering mailer/issue_edit.text.erb within layouts/mailer I, [2020-01-17T08:29:24.450757 #863] INFO -- : Rendered mailer/_issue.text.erb (127.2ms) I, [2020-01-17T08:29:24.450849 #863] INFO -- : Rendered mailer/issue_edit.text.erb within layouts/mailer (130.8ms) I, [2020-01-17T08:29:24.460368 #863] INFO -- : Rendering mailer/issue_edit.html.erb within layouts/mailer I, [2020-01-17T08:29:24.470037 #863] INFO -- : Rendered mailer/_issue.html.erb (1.8ms) I, [2020-01-17T08:29:24.470129 #863] INFO -- : Rendered mailer/issue_edit.html.erb within layouts/mailer (9.7ms) I, [2020-01-17T08:29:25.177654 #863] INFO -- : Performed ActionMailer::DeliveryJob (Job ID: 697a18e7-af06-4a2b-938a-d8fa6584d333) from Inline(mailers) in 1056.15ms I, [2020-01-17T08:29:25.181051 #863] INFO -- : Enqueued ActionMailer::DeliveryJob (Job ID: 697a18e7-af06-4a2b-938a-d8fa6584d333) to Inline(mailers) with arguments: "Mailer", "issue_edit", "deliver_now", #>, #> ```

Problemstellung Wiedervorlage

Wie gesagt: jetzt kommt der etwas verrücktere Part. Auf dem Test-System werden die Wiedervorlagen jetzt auch als solche aktiviert. Es kommt mir zwar noch etwas komisch vor aber das scheint ein anderes Problem zu sein (wahrscheinlich schreibe ich dir noch einen PR).

Auf dem Produktivsystem hingegen werden weiterhin keine Anpassungen an den Daten vorgenommen. Das Plugin zeigt hier also wieterhin genau das selbe Problem.

Zwischen den Systemen gibt es natürlich eine Reihe unterschiede. Zum einen wäre da die Anzahl der Tickets. Das sollte aber eigentlich keinen großen Unterschied machen. Zum anderen wären da andere Plugins. Vielleicht gibt es da eine Kollision. Ich werde einmal versuchen, die selben Plugins zu installieren, wie auf dem Produktiv-System. Dann sehen wir weiter.

christianlupus commented 4 years ago

Kurzes Update: Das Einrichten aller meiner Plugins des Produktiv-Systems hat den Fehler auf dem Test-System nicht provozieren können. Ich bin ein wenig ratlos...

HugoHasenbein commented 4 years ago

wenn etwas einen Fehler nicht provozieren kann, das scheint doch gut zu sein

Am 17.01.2020 um 10:32 schrieb Christian notifications@github.com:

Kurzes Update: Das Einrichten aller meiner Plugins des Produktiv-Systems hat den Fehler auf dem Test-System nicht provozieren können. Ich bin ein wenig ratlos...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/2?email_source=notifications&email_token=AJWRDRBJ3I7AXOSREFNGF33Q6F3JFA5CNFSM4KHJYGH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJHCTGI#issuecomment-575547801, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRGXPQYXW2DTO5GYTWTQ6F3JFANCNFSM4KHJYGHQ.

HugoHasenbein commented 4 years ago

es sieht so aus, als wäre dem Plugin die ID des Wiedervorlage-Datum-Custom Fields verloren gegangen. Prüfe bitte, ob das Custom Field in der Plugin Konfiguration noch existiert.. Ich habe einen Patch geschrieben, der das abfängt. Bitte, lade das Plugin von GitHub erneut runter und probiere es neu.

Am 17.01.2020 um 10:32 schrieb Christian notifications@github.com:

Kurzes Update: Das Einrichten aller meiner Plugins des Produktiv-Systems hat den Fehler auf dem Test-System nicht provozieren können. Ich bin ein wenig ratlos...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/2?email_source=notifications&email_token=AJWRDRBJ3I7AXOSREFNGF33Q6F3JFA5CNFSM4KHJYGH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJHCTGI#issuecomment-575547801, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRGXPQYXW2DTO5GYTWTQ6F3JFANCNFSM4KHJYGHQ.

christianlupus commented 4 years ago

Nein, das ist schlecht. Denn auf dem Produktivsystem taucht der Fehler ja weiterhin auf. Also nicht gut. Ich hatte gehofft, auf dem Test-System den Fehler nachstellen zu können, um dann zu Debuggen.

HugoHasenbein commented 4 years ago

hast Du geprüft, ob die Custom_Field Zuordnung in der Plugin-Konfiguration noch richtig ist?

Am 17.01.2020 um 11:28 schrieb Christian notifications@github.com:

Nein, das ist schlecht. Denn auf dem Produktivsystem taucht der Fehler ja weiterhin auf. Also nicht gut. Ich hatte gehofft, auf dem Test-System den Fehler nachstellen zu können, um dann zu Debuggen.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/2?email_source=notifications&email_token=AJWRDRDZMMETVA2HYX577WTQ6GB3NA5CNFSM4KHJYGH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJHHTXI#issuecomment-575568349, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRFCI2IFHJPIVXC7XBDQ6GB3NANCNFSM4KHJYGHQ.

christianlupus commented 4 years ago

Ja, die war (und ist noch drinnen)

christianlupus commented 4 years ago

Ich mach mal kurz einen Test fertig, melde mich dann noch mal.

HugoHasenbein commented 4 years ago

mit dem neuen Patch immer noch der Fehler?

Am 17.01.2020 um 11:40 schrieb Christian notifications@github.com:

Ja, die war (und ist noch drinnen)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/2?email_source=notifications&email_token=AJWRDRGWGYWZEY3IE53O7I3Q6GDLFA5CNFSM4KHJYGH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJHIX4Y#issuecomment-575572979, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRC3EGQJZXGDOLAVFO3Q6GDLFANCNFSM4KHJYGHQ.

christianlupus commented 4 years ago

Ich habe das Problem, dass im Moment das Datumsfeld zwar in den Einstellungen angezeigt wird, aber scheinbar nicht erkannt wird. Diese Zeile wirft einen Fehler, dass nil.value nicht gehen würde.

HugoHasenbein commented 4 years ago

Dann ist garantiert in der Tabelle custom_values der Eintrag für das entsprechende Ticket gelöscht worden. Darf nicht sein, aber es ist wohl so. Es gibt eine Tabelle custom_fields - die beschreibt den Datentyp. Jedes custom_field hat für jedes Ticket ein custom_value.

Das ist ein herber Daten-Fehler in der Datenbank.

Trage zur Heilung unter die Zeile 62 folgendes ein:

if resubmission_date.nil? CustomValue.create( :custom_field_id => Setting['plugin_redmine_auto_resubmission']['custom_field_id_date'], :customized_id => self.id http://self.id/ :customized_ty => "Issue" end

wenn wieder alles läuft, diese Zeilen wieder löschen. Es hört sich derzeit nicht nach einem Plugin-Fehler an, gleichwohl fange ich das Problem ab

Am 17.01.2020 um 11:50 schrieb Christian notifications@github.com:

Ich habe das Problem, dass im Moment das Datumsfeld zwar in den Einstellungen angezeigt wird, aber scheinbar nicht erkannt wird. Diese Zeile https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/64e2cfd008836663bb7f721a419d3a100b860e4e/lib/redmine_auto_resubmission/patches/issue_patch.rb#L64 wirft einen Fehler, dass nil.value nicht gehen würde.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/2?email_source=notifications&email_token=AJWRDRBB3AO2HPEM5TILLCLQ6GENVA5CNFSM4KHJYGH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJHJQGQ#issuecomment-575576090, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRGDPJLW7E2QMVYSQPDQ6GENVANCNFSM4KHJYGHQ.

HugoHasenbein commented 4 years ago

Ist das Feld "Wiedervorlagedatum" für jeden Benutzer sichtbar oder nur für bestimmte Rollen?

Am 17.01.2020 um 11:50 schrieb Christian notifications@github.com:

Ich habe das Problem, dass im Moment das Datumsfeld zwar in den Einstellungen angezeigt wird, aber scheinbar nicht erkannt wird. Diese Zeile https://github.com/HugoHasenbein/redmine_auto_resubmission/blob/64e2cfd008836663bb7f721a419d3a100b860e4e/lib/redmine_auto_resubmission/patches/issue_patch.rb#L64 wirft einen Fehler, dass nil.value nicht gehen würde.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/2?email_source=notifications&email_token=AJWRDRBB3AO2HPEM5TILLCLQ6GENVA5CNFSM4KHJYGH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJHJQGQ#issuecomment-575576090, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRGDPJLW7E2QMVYSQPDQ6GENVANCNFSM4KHJYGHQ.

christianlupus commented 4 years ago

Ist das Feld "Wiedervorlagedatum" für jeden Benutzer sichtbar oder nur für bestimmte Rollen?

Das war's!

Das Feld war nur für bestimmte Benutzergruppen sichtbar. Ich habe es umgestellt und schon hat auch der rake-Vorgang sofort funktioniert. Sogar ohne die Anpassung von oben (also kein herber DB-Daten-Fehler).

Kannst du per Redmine abfragen, ob ein bestimmtes Feld eingeschränkt sichtbar ist? Dann wäre das auf jeden Fall einen Feature Request wert ;)

Ich werde mal dieses Thema zu machen und dann ggf noch einmal auf andere Sachen zurück kommen.

HugoHasenbein commented 4 years ago

Hallo Christian,

läuft das Plugin denn jetzt? Ich habe in der letzten Veröffentlichung auf Github eingebaut, dass sämtliche Rechte an den Tickets beachtet werden, also

Um mit rake alle fälligen Tickets wiedervorzulegen, teilt man dem rake task die ID eines Users mit, der die entsprechenden Rechte hat. Das ist nicht zwangsläufig admin, sondern ein User mit entsprechenden Rollen und Rechten.

Wird ein Ticket mit Eintrag im Journal / Ticket wiedervorgelegt, nicht jedoch das Feld aktualisiert, so fehlt es dem Nutzer an entsprechenden Rechten.

Bei mir klappt das Tool - ich bin aber stets gespannt, unter welchen anderen Bedingungen das Plugin läuft und ggf. dann anders als erwartet arbeitet. Als Gegenleistung für Feedback arbeite ich Lösungen aus.

Am 17.01.2020 um 13:10 schrieb Christian notifications@github.com:

Closed #2 https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/2.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/2?email_source=notifications&email_token=AJWRDRCXQBYG4ANTPZKLRTDQ6GN4NA5CNFSM4KHJYGH2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOWBHIC7I#event-2957934973, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRB5UBD2HBEIACFQKJTQ6GN4NANCNFSM4KHJYGHQ.

christianlupus commented 4 years ago

Hallo Stephan,

im Moment läuft das Plugin. Ich hatte die Rechte des Feldes so angepasst, dass jeder es sehen kann und schon lief es. Ich werde aber gerne noch einmal mit der aktualisierten Version von dir testen.

Ich werde mich dann noch mal melden, wenn es geklappt hat.

christianlupus commented 4 years ago

OK, ich habe es eben einmal ausprobiert und das Plugin scheint momentan ganz gut zu laufen.

Vielen Dank für die Mühen!

christianlupus commented 4 years ago

PS: Ich musste lediglich einen eigenen Benutzer anlegen, der die Wiedervorlagen einträgt, damit ich auch Erinnerungs-Mails bekomme.

christianlupus commented 4 years ago

Hallo noch einmal!

Ich hatte in meiner Konfig noch einen Fehler (Cron hat den falschen Benutzer genommen -> keine Mails, s.o.) aber sonst ist es korrekt durch gelaufen. Zu 99% ist das Problem dieses Issues also gelöst.

HugoHasenbein commented 4 years ago

Den Benutzer gibst man mit einer Zahl an, z.B.:

export RAILS_ENV=production; rake redmine:resubmit:resubmit_issues[1]

wenn es sich um den Admit mit der User_id 1 handelt.

dito mit anderen Usern

Am 21.01.2020 um 10:55 schrieb Christian notifications@github.com:

Hallo noch einmal!

Ich hatte in meiner Konfig noch einen Fehler (Cron hat den falschen Benutzer genommen -> keine Mails, s.o.) aber sonst ist es korrekt durch gelaufen. Zu 99% ist das Problem dieses Issues also gelöst.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_auto_resubmission/issues/2?email_source=notifications&email_token=AJWRDREYAMS67EX6KNBOQULQ63BARA5CNFSM4KHJYGH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJPEP5A#issuecomment-576604148, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDREC5MFKMIC7U4GA5HTQ63BARANCNFSM4KHJYGHQ.

christianlupus commented 4 years ago

Jop, ich hatte erst 1 angegeben (admin) aber dann bekomme ich (bin Admin) keine Mails. Daher habe ich einen 2. Admin eingerichtet, der die Mails dann auch an mich schickt. Per rake hat es geklappt. Hatte nur vergessen das in der Crontab anzupassen.