I can't log work time (incompatibility with Insight)

Issue #39 resolved
Alberto Borja created an issue

When I try to log time in a task and day I get an error.

It’s happening from last 6 months, after Jira Server upgrade, in older versions it was working well

Comments (21)

  1. Johannes Heger repo owner

    Hello, sorry for this!

    Just for me:

    “debe ingresar la fecha en que empezo a trabajar en la incidencia”

    is Spanish and is in English (thanks to deepl.com):

    “You must enter the date when you started working on the issue.”

    Can you please give the following information:

    1. What Jira-version did you run when it worked the last time?
    2. And what Trock-version have you installed when it worked the last time?
    3. What Jira-version do you run now?
    4. What Trock-version do you run now?
    5. Have you updated the Trock-version according the History on the Trock's Atlassian Marketplace page?
    6. Any errors in the atlassian-jira.log?
    7. Any errors in the brower's Development Panel? You can open it with F12 (Firefox, Chrome), select the tab Development, and reproduce the error. You can close it with pressing F12 again.
    8. What is the system language you set on the Jira System admin page? Please have a look at <your-base-url>/secure/admin/ViewApplicationProperties.jspa item "Default language".
    9. What language have you choosen in your personal profile setting?
    10. When you open the Advanced Settings on <your-base-url>/secure/admin/AdvancedApplicationProperties.jspa: Please give the following settings:
      a) jira.date.picker.java.format
      b) jira.date.picker.javascript.format
      c) jira.date.time.picker.java.format
      d) jira.date.time.picker.javascript.format

    Kind regards, Johannes

  2. Alberto Borja reporter
    1. What Jira-version did you run when it worked the last time?
      Sorry I don’t know what version it was working well because it stopped working some almost a year ago
    2. And what Trock-version have you installed when it worked the last time?
      Same answer.
    3. What Jira-version do you run now?
      8.16.0
    4. What Trock-version do you run now?
      3.0.9
    5. Have you updated the Trock-version according the History on the Trock's Atlassian Marketplace page?
      I think so, I don't see any new version but can't be sure
    6. Any errors in the atlassian-jira.log?
      I see next error many times
      2021-10-02T03:52:55.585+0200: 532143,711: [GC (Allocation Failure) [PSYoungGen: 681825K->10465K(685056K)] 1489677K->818350K(2083328K), 0,1009220 secs] [Times: user=0,11 sys=0,00, real=0,10 secs]
    7. Any errors in the brower's Development Panel? You can open it with F12 (Firefox, Chrome), select the tab Development, and reproduce the error. You can close it with pressing F12 again.
      I saw some warnings on page load but any error with I try to input the time.
    8. What is the system language you set on the Jira System admin page? Please have a look at <your-base-url>/secure/admin/ViewApplicationProperties.jspa item "Default language".
      Lenguaje por defecto: español (España)
      Huso Horario por defecto: (GMT+01:00) Madrid
    9. What language have you choosen in your personal profile setting?
      Lenguaje:español (España) [por defecto]

      Huso Horario::Predeterminado (Jira) (GMT+01:00) Madrid

    10. When you open the Advanced Settings on <your-base-url>/secure/admin/AdvancedApplicationProperties.jspa: Please give the following settings:
      a) jira.date.picker.java.format
      d/MMM/yy
      b) jira.date.picker.javascript.format
      %e/%b/%y
      c) jira.date.time.picker.java.format
      dd/MMM/yy h:mm a
      d) jira.date.time.picker.javascript.format
      %e/%b/%y %I:%M %p

    Thank you

  3. Johannes Heger repo owner

    Hi Alberto, can't reproduce the error so far. Would you please give some more informations?

    A )

    Clear your browser cache, at least the cookies.

    B )

    In Trock, with lang set to ES (as is):

    1. Open the browser Development panel, select tab Network (1), clear the history (2).
    2. Log work. In (3) there are new entries.
    3. Select one entry, than right mouse click, "Save all as HAR..." (4).
    4. Open the file with a text editor and have a look at the file content for data that should not be visible at my public issue tracker, remove those data.
    5. Attach that file to this issue #39 as trock_ES.har.

    C )
    Set Jira to English in your profile and repeat the steps above.

    Did the error occur?

    Attach that file to this issue #39 as trock_EN.har.

    D )

    Set Jira back to ES in your profile.

    1. In the issue RISHT-6424: Mas > Registrar trabajo; the dialog has been opened. Keep the dialog open, but do not log work.
    2. Open the browser Development panel, select tab Network (1), clear the history (2).
    3. Log work in the dialog. In (3) there are new entries.
    4. Select one entry, right mouse click, "Save all as HAR..." (4)
    5. Have a look at the file content for data that should not be visible at my public issue tracker, remove those data.
    6. Attach that file to this issue #39 as issue_ES.har.

    Does this work or do you see an error?

    How to get the HAR-file:

    Kind regards, Johannes

  4. Alberto Borja reporter

    A )

    Clear your browser cache, at least the cookies.
    I have just tried and it is not working. I tried with Chrome, edge and firefox

    B )

    C )

    With my profile in english it’s working fine.

    D ) Result is same as in step B.

    I get same error.

  5. Johannes Heger repo owner

    Hello Alberto,

    there is an interesting detail in one of your screenshots:
    In the screenshot showing the Trock's week-view, Jira's global menu language is ES, but Trocks timerange and weekday-names are in EN. This is suspicious, as Trock should follow Jira's lang-setting for those data. Trock is not fully localized, but the timerange as well as the weekday-names are. In my test-instance, setting the lang to ES, the timerange as well as the weekday-names are shown in ES.
    So there is something different in your instance leading Trock to the assumption the lang-setting is EN. As a consequence, the date of logged work is sent as "13 Oct 21" with an uppercase 'O' as usual in EN. But because Jira is set to ES, Jira's date parser expects the date as "13 oct 21" with lower case 'o' as usual in ES. This results to an error and the error message you sent me.

    I'm curious if this is only the case on the Trock page, or also the case logging work on an issue's page.

    Please:

    E )

    • With your system default language set to ES, and your personal lang-settings to ES (default):
    • Open Trock, right mouse-click, select context menu entry something like "show HTML" or "show sources". A new tab with the page HTML opens.
    • Copy line 1 to line ~55 containing the <html>- and all the <meta>-tags.
    • Save those lines as trock_ES.html and attach the file to this issue #39.

    F )

    • On the trock page, open the Developer panel, tab Console. At the bottom, you'll find a sinle input line for code.
    • Insert: moment().fromNow(), press Enter. Please give the output.
    • Insert: moment.locales(), press Enter. Please give the output.

    G )

    • Deactivate Trock in the admin-settings.
    • With your system default language set to ES, and your personal lang-settings to ES (default):
    • Go to the issue RISHT-6424 by opening <your-base-url/browse/RISHT-6424,
    • right click, select context menu entry something like "show HTML" or "show sources". A new tab with the page-HTML opens.
    • Copy line 1 to line ~55 containing the <html>- and all the <meta>-tags.
    • Save those lines as issue_ES.html and attach the file to this isssue #39.
    • In the issue RISHT-6424: Open the Log Work dialog by: Mas > Registrar trabajo.
    • Log work.
    • If the <html lang="es"> -tag and/or the <meta name="ajs-user-locale" content="es_ES"> -tag states ES, logging work should have been successful.
    • If the/those tags states EN, I expect logging work has been failed. If EN, Trock can't be the root-cause.
    • Activate Trock.

    H )

    • Still on the issue page <your-base-url/browse/RISHT-6424, open the Developer panel, tab Console.
    • Insert: moment().fromNow(), press Enter. Please give the output.
    • Insert: moment.locales(), press Enter. Please give the output.

    I )

    • Do you use any browser add-on for setting the language or the locale? Or do you use any browser add-on for anonymization, or for pretending another browser or OS?

    --

    Aside from the instructions above, you can check logging work in Trock as well as on the issue-page with the system default lang DE (German), which expects the “13 Okt 21” with uppercase ‘O' and ‘k’ instead of ‘c’. If Trock or the frontend at all “thinks” it is running in EN, you’ll see the error message “Sie müssen ein Datum für die Arbeit angeben.”

    Sorry for all this work for you. This is a very interesting case.

    Kind regards, Johannes

  6. Alberto Borja reporter

    E )

    • trock_ES.html is attached

    F )

    • Insert: moment().fromNow(), press Enter. Please give the output.
      'a few seconds ago'
    • Insert: moment.locales(), press Enter. Please give the output.
      (128) ['en', 'af', 'ar-dz', 'ar-kw', 'ar-ly', 'ar-ma', 'ar-sa', 'ar-tn', 'ar', 'az', 'be', 'bg', 'bm', 'bn', 'bo', 'br', 'bs', 'ca', 'cs', 'cv', 'cy', 'da', 'de-at', 'de-ch', 'de', 'dv', 'el', 'en-SG', 'en-au', 'en-ca', 'en-gb', 'en-ie', 'en-il', 'en-nz', 'eo', 'es-do', 'es-us', 'es', 'et', 'eu', 'fa', 'fi', 'fo', 'fr-ca', 'fr-ch', 'fr', 'fy', 'ga', 'gd', 'gl', 'gom-latn', 'gu', 'he', 'hi', 'hr', 'hu', 'hy-am', 'id', 'is', 'it-ch', 'it', 'ja', 'jv', 'ka', 'kk', 'km', 'kn', 'ko', 'ku', 'ky', 'lb', 'lo', 'lt', 'lv', 'me', 'mi', 'mk', 'ml', 'mn', 'mr', 'ms-my', 'ms', 'mt', 'my', 'nb', 'ne', 'nl-be', 'nl', 'nn', 'pa-in', 'pl', 'pt-br', 'pt', 'ro', 'ru', 'sd', 'se', 'si', 'sk', 'sl', …]

    G )

    • issue_ES.html is attached

    H )

    • Insert: moment().fromNow(), press Enter. Please give the output.
      Same as F)
    • Insert: moment.locales(), press Enter. Please give the output.
      Same as F)

    I )

    • Do you use any browser add-on for setting the language or the locale? Or do you use any browser add-on for anonymization, or for pretending another browser or OS?
      No, and I tryed in Firefox and Edge with same results.

    I think Jira is using english format because in Log Work screen is requesting in english format:
    Tiempo Trabajado requerido (Por ejemplo, 3w 4d 12h) 
    but you expected spanish format in trock

    Thank you so much

  7. Johannes Heger repo owner

    Thank you for your patience and detailed information.

    Regarding pont D) What I can see from the issue_ES.har taken from the issue-page (not the Trock page) is, sending the Log Work form sent the date in the EN format "13%2FOct%2F21%209%3A10%20AM". Means, the "Oct" with upper "O", even the language is set to ES. I expected the "oct" in that case. This should have been resulted in the error even on the issue-page. You wrote as an answer to my question D) "I get same error." which should approve this. Unfortunately a screenshot from Trock was attached to answer D) (I think accidentally). Therefore I'm not 100% sure if the error has been occured in the issue-page as well.

    To prove this finally, could you please
    Disable Trock to be sure Trock is not involved at all.
    Open the issue-page <your-base-url/browse/RISHT-6424. If it is already open, reload the page.
    Log work: Mas > Registrar trabajo.
    Does the error occur?

  8. Alberto Borja reporter

    Thank you for your time Johannes.

    The image I attached in D) was not accidental. I wanted you see same error was happening. The error has been occured only when I use your plugin to register time. In issue-page is working fine.

    Thank you.

  9. Johannes Heger repo owner

    Hello Alberto,

    sorry for bothering you so much.

    Trock definitely has an error, or at least is not that robust as it should be.

    J )

    Could you please send me a screenshot as in the following example:

    • Please set your lang to ES.
    • Reload Trock page, so (1) is ES.
    • Select time range “Custom” and click the pencil button (2).
    • The dialog (3) opens.
    • I’m interested in the data marked with (4), please make a screenshot as in my example-screenshot.
    • Switch back to your favourite time range setting Month or Week.

    K ) Announcement Banner

    Do you have any Javascript in your Announcement Banner? If so, in your test instance:

    • Open the Annourncement Banner at <jira-base-url>/secure/admin/EditAnnouncementBanner!default.jspa
    • Copy the content to a temporary text file as a backup.
    • Clear the content.
    • Open Trock page
    • Log work. Do you see the error?
    • Restore the content to the Announcement Banner.

    L ) Save Mode

    If the Announcement Banner was not affecting Trock; only in your test-instance:

    • Got to the page with the list of installed add-ons: <your-base-url>/plugins/servlet/upm?source=side_nav_manage_addons
    • Click “Enter Save Mode” button at the right bottom . This disables all add-ons.
    • Enable Trock add-on.
    • Open Trock page.
    • Make a reload.
    • Log work. Do you see the error? Or does it work?

    If it works, some add-on affects Trock (and I have to make Trock more robust).

    M ) Enable add-ons

    If Trock didn’t worked in L):

    • Enable all add-ons at once exiting save mode by clicking the link “Exit safe mode and restore previous configuration”.

    If Trock worked in L):

    • If you have not that much add-ons it would help me a lot to find the add-on affecting Trock if you re-enable all add-ons one by one. Each time you enabled an add-on, go to Trock page, make a reload, and try to log work until you see the error. Please give me the name and version of that add-on.
    • Finally “Exit safe mode and restore previous configuration” (despite all add-ons are enabled).

    Is it OK for you to send my the list of your installed add-ons?

    Kind regards, Johannes

  10. Alberto Borja reporter

    J) My language was already in Spanish. The funny thing is that in trock everything appears in English, however when registering work from Jira it does appear in Spanish

    K) My announcement banner is empty

    L) If I enable safe mode trocks language is now in spanish and logging work is working fine inside trock

    K) Insight plugin is the addon is affecting trock if I enable it the problem returns.

    Thank you

  11. Johannes Heger repo owner

    Nice work, Alberto, thank you very much for all the details!

    I could reproduce this installing Insight. I’m fixing Trock. I started today and have a solution. There is a minor UI-bug left using the Custom time rage, but logging work works now. I compiled a version for you, please download jira-trock-3.0.10-ab.1.jar. I’m going to proceed on this mid of next week and will release a version on the Atlassian Marketplace during November.

    Please let me know if 3.0.10-ab.1 works for you.

    Kind regards, Johannes

  12. Alberto Borja reporter

    Thank you very much for your dedication Johannes and congratulations on your plugin.
    Kind regards

  13. Johannes Heger repo owner

    Hello Alberto,

    I made some tests with Jira versions and Insight versions. It turned out this issue is gone starting Jira 8.18.0. So after your next update to the latest Jira version you shouldn’t have this issue any more with Trock 3.0.9 (or whatever version is released then). So I like you to use the patched version I sent you until your next update. Because you are the only customer having this issue so far, and the issue do not take place in newer Jira-versions, I like to not release a patched version for this special case.

    Please contact me if you have any trouble with Trock.

    About the Jira- and Insight-versions (for any reader of this issue):

    • Users with Insight as part of Jira (-Service Management) Would have this issue with Jira version before 8.18.0.
    • Users with Insight installed from the Atlassian Marketplace would have this issue with Insight versions before 8.7.11.

    Kind regards, Johannes

  14. Log in to comment