Hi, kgund! Have you reported this issue to Atlassian? I have reached the same conclusion as you: Jira overrides the setFullYear function - something that is a critical error for any system that allows plugins to be installed. It e.g means that any JS library that relies on this function will stop working, which includes “de facto” tools like date-fns, and any code that uses this library.
I asked Stack Overflow for help, and found a solution that worked for our case:
setting the following statement on the starting point of our application solved the issue:
Date.prototype.setFullYear = Date.prototype.__msh_oldSetFullYear;
Date.prototype.__msh_oldSetFullYear is the native implementation of
setFullYear that (luckily) had stored and exposed through a variable by the offending
This issue has now been confirmed by the Atlassian developer team: