Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-69491

Jira overrides Date.prototype.setFullYear by the "jira.webresources:calendar-lib", breaking the default Javascript functionality of the function

    XMLWordPrintable

Details

    • Bug
    • Resolution: Timed out
    • Low
    • None
    • 7.13.3
    • Front-end API
    • None

    Description

      Problem:

      The standard Javascript function Date.prototype.setFullYear gets overwritten by the "jira.webresources:calendar-lib" (file: Calendar.js) module in such a fashion that it breaks any other javascript code or framework that depends on its original behavior of the function.

      This is a non-standard practice and should be deprecated by Jira.

      Plugin developers spend lots of time trying to figure out a workaround to be able to access the original method.

      Workaround:

      The original behavior of Date.prototype.setFullYear is saved in Date.prototype.__msh_oldSetFullYear so the user can just reassign the original value in his script.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sabdelfattah Sherif Abdelfattah (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: