I am having an issue while retrieving a date field from CRM using Fetchxml and displaying it using web template in CRM Portals.
Date is CRM:
10/10/2018 00:00:00 (TimeZone UTC+10:00)
CRM Portals (Adx studio portals) renders the below:
09/10/2018 02:00:00 PM
Can someone suggest how to handle this?
Regards,
Rizwan Aarif
Check out Behavior and format of the date and time field.
Specifically I think you will want to look at these elements:
Depending on what the field represents, you can choose one of the
following field behaviors for portal forms and grids:
User Local: The field values are displayed in the user’s local time
and formatted as per their current portal language/locale.
...
You can also override the default date/time format to be used on
portals by creating the following site settings:
DateTime/DateFormat: The date format used on the portal.
DateTime/TimeFormat: The time format used on the portal.
DateTime/DateTimeFormat: The format for full date and time used on the portal.
By default, the portal uses the standard date/time formats specified
by the website language settings.
Is there a way to export Sonarqube reports into Excel - based on major, minor and critical categories?
You can use the REST API, to query the data into JSON text and then export that JSON to a CSV file.
I used the command below to get a JSON response:
http://xxxxx.xx.xxxx.com:9000/api/issues/search?componentRoots=test_xxx_xx&statuses=OPEN,REOPENED&pageSize=500&pageIndex=1
Where componentRoots is the your sonar project name.
It gave all the issues in JSON and then I converted it in to a CSV.
The only way is to use the api/issues/search web service
Yes you can use the REST APIs provided with SonarQube to query. The documentation of APIs is also embedded into every Sonar instance as different versions expose different APIs.
We use Python for similar work as response will be in JSON and it will be easier to manipulate. Once you have arrived extracted issues of your liking, write them into .CSV or excel.
Link to web services will be in footer of Sonar Instance.
PS: Expanded answer to offset short-sighted answering. What is provided here is only abstract and not complete answer with query details.
Not recommended by community
With DB:- If you have been using Sonar for long and if you won't upgrade SQ too often you can choose to study table structure and understand how data is organised. We have done this too, but it gets messier with every passing upgrade (more inner queries). Cost of querying will be saved on bulk process of data as ES is not involved
Please try the following command to get all issues in JSON format. Then you may consider to parse output by using jason parser programs.
Replace "XXX:XXX" with Sonar Key defined in "sonar.projectKey" variable on "sonar-project.properties.txt" file
http://localhost:9000/api/issues/search?componentKeys=XXX:XXX
I used F12 developer tools to create the report. Here is step by step solution:
Before opening Sonar report, press F12 to open developer tools in the browser tab (Refer screenshot). Click on Network tab. Initially it'll be empty:
Open Sonar report in the same browser tab.
Now you have to select a request in URL column (Refer screenshot in point # 4). You've to select that request whose URL is of the format - https://sonar:8443/api/issues/search?. Base URL might be different depending upon the name of the server where you have hosted Sonar website.
Click on Response tab (Refer screenshot):
Copy the entire JSON data to clipboard. First press Ctrl + A and then Ctrl + C to copy the contents.
JSON data that you got is in below format:
Data of all the issues is present inside issues key. It is of array type as it contains a list of issues. Paste the entire JSON data into any notepad editor and get the value of issues node. A sample issues node data is shown below:
[
{
"key":"AYMBNpviy48WWZHdsU1Z"
,"rule":"OWASP:UsingComponentWithKnownVulnerability"
,"severity":"MAJOR"
,"component":"B91661CE-50F8-45CB-8F54-29CD044EF32D"
,"project":"B91661CE-50F8-45CB-8F54-29CD044EF32D"
,"flows":[]
,"status":"OPEN"
,"message":"Filename: jquery-ui-1.10.3.custom.js | Reference: CVE-2021-41184 | CVSS Score: 6.1 | Category: CWE-79 | jQuery-UI is the official jQuery user interface library. Prior to version 1.13.0, accepting the value of the `of` option of the `.position()` util from untrusted sources may execute untrusted code. The issue is fixed in jQuery UI 1.13.0. Any string value passed to the `of` option is now treated as a CSS selector. A workaround is to not accept the value of the `of` option from untrusted sources."
,"author":""
,"tags":["cve","cwe","cwe-937","owasp-a9","vulnerability"]
,"transitions":["confirm"]
,"actions":["set_tags","comment","assign"]
,"comments":[]
,"creationDate":"2022-08-18T06:35:49+0100"
,"updateDate":"2022-08-18T06:35:49+0100"
,"type":"VULNERABILITY"
,"branch":"sonarqubepr"
,"scope":"MAIN"
,"quickFixAvailable":false
},
{
"key":"AYMBNpviy48WWZHdsU1_"
,"rule":"OWASP:UsingComponentWithKnownVulnerability"
,"severity":"MAJOR"
,"component":"B91661CE-50F8-45CB-8F54-29CD044EF32D"
,"project":"B91661CE-50F8-45CB-8F54-29CD044EF32D"
,"flows":[]
,"status":"OPEN"
,"message":"Filename: jquery.ui.datepicker-ml.min.js | Reference: CVE-2021-41183 | CVSS Score: 6.1 | Category: CWE-79 | jQuery-UI is the official jQuery user interface library. Prior to version 1.13.0, accepting the value of various `*Text` options of the Datepicker widget from untrusted sources may execute untrusted code. The issue is fixed in jQuery UI 1.13.0. The values passed to various `*Text` options are now always treated as pure text, not HTML. A workaround is to not accept the value of the `*Text` options from untrusted sources."
,"author":""
,"tags":["cve","cwe","cwe-937","owasp-a9","vulnerability"]
,"transitions":["confirm"]
,"actions":["set_tags","comment","assign"]
,"comments":[]
,"creationDate":"2022-08-18T06:35:49+0100"
,"updateDate":"2022-08-18T06:35:49+0100"
,"type":"VULNERABILITY"
,"branch":"sonarqubepr"
,"scope":"MAIN"
,"quickFixAvailable":false
}
]
The JSON array data obtained in previous step is of real use. Convert this JSON array data into an EXCEL file using any online converter. I used the following website - https://www.convertcsv.com/json-to-csv.htm
What if my report has more than one page?
Sonar loads 100 records per page. To get the next page you've to click on Show More button at the bottom:
Every time you click on the Show More button, a new request goes to the Sonar server which will show up in the F12 developer tool's Network tab. So for all subsequent pages, repeat same set of steps to create a new Excel sheet per page. Then merge all the Excel sheets manually to create single master report.
Note: While merging the Excel files, remember that every Excel file will have a header row at the top. While merging the files, you'll have to keep the header row from from the first Excel sheet and ignore from the rest.
I have just now deployed a SpagoBI server and after setting up my data source: MS SQL Server.
I am able to successfully create a data set. Now using my data set I want to create a stacked bar chart. So I select Charts->Stacked but to my surprise that perhaps a default stackbar of "Sales, costs and revenues over the year Monthly detail - Year: 2012" always comes up. I was not able to see charts for my data set.
However I still see my data set there. I tried many ways to use the output of my data set for stack bar but un-fortunately always the default chart comes up?
How can I create a Stacked Bar Chart with my data set created?
1.First, write xml related to your query in database.
2.then , log in to SpagoBI server then create datasource-> dataset-> choose document.
3.Fill all the informaion, and there is an Template option browse the xml file in it.
4.And create Analytical driver management and lov management related to your query columns thatyou wants to choose.
5.And run the report document.
If you creating dashboard in SpagoBI Studio 5.1 then
1.Click on project and Create under SpagoBI.
2.Click on window - others perspective - choose - report design.
3.In report design - create Report - under Business Analysis folder finish.
4.Right Click on data source create - new data source and choose your db as per your requirement.
5.then , data set.
6.then create your dashboard as you want to create.
7.When you deploy your report in SpagoBI server again click on windows - other perspective - choose SpagoBI
8.Expand your project and you see a Server name folder then right click on server provide SpagoBI url and password
9.Right click on report provide name all the credential. and deploy.
Try this Prakash.
I inherited a legacy system using Crystal Reports in VS.NET pulling info from an Oracle11g DB.
The database fields are in "REPORT_DATA", I updated the stored procedure which the code is querying to add a field, however I cannot see that new field in the field explorer.
When I click on "Verify Database" and manage to log into the DB I get a "Remove Table" prompt - "The database table "REPORT_DATA" cannot be found. Proceed to remove this table from the report?"
Of course, there is no REPORT_DATA table and there never was.
When I preview the report or put it on the server it works, so there is some behind-the-scenes magic which I don't understand.
Figured it out.
I had to highlight the server name in the “Current Data Source” area and the name of the server in the “Replace With” area on the Set Datasource Location window. Then click the “Update” button.
Since the report wasn't built on my machine it had to be reconfigured - can't figure out why it still connected to the DB when previewing though.
.
Hey guys,
I have a strange behaviour and am wondering why this happens:
My managed bean holds three values (selected plant, selected year and selected month). When opening the required page a #PostConstruct method is called and initializes the plant data according to the selected/pre defined plant, year and month. When changing one of these three options data should be updated and displayed via AJAX request. In order to switch to edit mode I can click my button and change one value from true to fals which is indicating whether the page should be displayed in view or edit mode.
Now here is my problem:
My local Weblogic Server (IntegratedWeblogicServer - standard configuration) works as expected. I open the page, see my current data, switch to edit mode, edit & save it. That's all. Works like a charm.
The productive Weblogic Server (configured by a colleague of mine) does some kind of cache I think. I open the page, see my current data, change year value to last year and see the updated values. When clicking on the "edit" button the old values are displayed instead of the updated values. This just happens as long as I do not switch the plant. My current workaround looks like this: open the page, switch the plant and then switch the year. After switching the plant everything works like expected. I can't figure out why the productive machine behaves different than the local machine. Each of the update methods setPlant(), setYear() and setMonth() call refreshValues() and are equal requading JSF definitions. So I don't know if it's a caching problem or maybe a Weblogic configuration problem.
Let me know if you need more information or certain code snippets. I excluded them as it is a lot of code.
Kind regards,
Stefi
Enable http headers debug from browser and monitor the difference in each environment. Also monitor the access.log on each domains server.