2014. július 16., szerda

JIRA - Internet Explorer 11 feels itself Mozilla :-)

In IE11

jQuery.browser.mozilla returns true
jQuery.browser.msie returns undefined
jQuery.browser.safari returns undefined

You can read more about it here.



Solution instead of using the above:

Query the user agent string by using window.navigator.userAgent which is
  • in Mozilla: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0,
  • in Chrome: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36,
  • in IE11: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; rv:11.0) like Gecko,
and find for the following strings:
  • in Mozilla - "Firefox",
  • in Chrome - "Chrome",
  • in IE11 - "Trident".
Note: you can search for "Trident" to identify Internet Explorer since IE9.

For example:
var ua = window.navigator.userAgent;
console.log(ua);
var msie = ua.indexOf("Trident"); // -1 if not found
console.log(msie);

Hurrah for IE11 again! ;-)

Oracle - Symptoms of Output Post-processor (OPP) problem

1. Post-processing of request <request_id> failed at <date> <time> with the error message:
The Output Post-processor is running but has not picked up this request.
No further attempts will be made to post-process this request, and the request will be marked
with Warning status.
Setting the profile option Concurrent: OPP Response Timeout to a higher value may be necessary.

Solution: ask the Database Administrator(s) to have a look :-)

2. Beginning post-processing of request <request_id> on node <node> at <date> <time>.
Post-processing of request <request_id> failed at <date> <time> with the error message:
One or more post-processing actions failed. Consult the OPP service log for details.

OPP service log:
...Output file was found but is zero sized - Deleted
...java.lang.reflect.InvocationTargetException
...
...Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded

Possible Reason: too large output file.
Possible Solution: submit the request again with more specific parameters (e.g. smaller date range).

2014. július 4., péntek

Oracle - Relationship between material transactions - orders, attachments - ap_invoices

select mmt.source_code           
         , mmt.transaction_id
         , oh.order_number           
  from mtl_material_transactions mmt                       
         , oe_order_headers_all oh         
where 1 = 1                                      
    and mmt.transaction_reference = oh.header_id (+)
    and mmt.transaction_id = <transaction_id>

 select aia.invoice_num
         , fad.*
  from fnd_attached_docs_form_vl fad
         , ap_invoices_all aia
where 1 = 1
    and aia.invoice_id = fad.pk1_value
    and aia.invoice_num = '<invoice_number>';

JIRA - Javascript is not loaded in Internet Explorer

1. Copy your test.js script to the following folder: /opt/apps/jira/apache-tomcat/atlassian-jira/includes/js,
2. Use jQuery.getScript in the given field description in the project's Field Configuration.

<script type="text/javascript">
  if (jQuery.browser.mozilla){
     jQuery.getScript("../includes/js/test.js")
       .done(function(script, textStatus) {
       console.log( "Loading javascript '../includes/js/test.js': " + textStatus );
     })
       .fail(function(jqxhr, settings, exception) {
       console.log("Loading javascript '../includes/js/test.js': " + exception);
     })
   }
   else if (jQuery.browser.msie || jQuery.browser.safari){
    jQuery.getScript("../includes/js/test_IE.js")
       .done(function(script, textStatus) {
       console.log( "Loading javascript '../includes/js/test_IE.js': " + textStatus );
     })
       .fail(function(jqxhr, settings, exception) {
       console.log("Loading javascript '../includes/js/test_IE.js': " + exception);
     })
   }
</script>



You could see in the browser's console that
"Loading javascript '../includes/js/test.js': success " in Firefox,
"Loading javascript '../includes/js/test_IE.js': success " in Chrome and IE.
Later in IE you got
"Loading javascript '../includes/js/test_IE.js': Not Found "
error but ONLY in IE. It worked well in Chrome.

It is a known issue, you can read more details here (in IE8 and IE9 the URL rewriting is not supported - in IE11 the javascript is loaded successfully).

Working well in ALL browsers changing the filepath of the javascript.
Instead of using
jQuery.getScript("../includes/js/test.js")
you have to use
jQuery.getScript("/jira/includes/js/test.js").

Easy :-)