Change texts of the Jira Service Manage Project help centre fields with Forge App - jira

In a project of Jira in client channels, within the help centre, I have created an app forge, and I have added a footer with the following example: https://developer.atlassian.com/platform/forge/ui-kit-components/jira-service-management/portal-footer/
I would like to use this forge app to access the fields already in the help centre and modify them.
By javascript console you can access the fields by the label and change them with innerHTML, is there any possibility to do this from the forge app with the footer created?
Example console and images
document.getElementsByClassName("sc-bHwgHz iVhUOe")[0] document.getElementsByClassName("sc-bHwgHz iVhUOe")[0].innerHTML = "Title modify"
I would need to do this with all the fields that are displayed in the help centre HTML from an app forge. Any solution would be appreciated
title
title modificated

Related

TextRotation angle is never set in Google Sheet API

I'm using Google Sheets API v4 from Java Client. I'm trying to get format from Cell class. Everything goes fine.
TEXT ROTATION
I'm succeed in getting TextRotation element with Vertical property set but, angle property is never set, what ever I put on source Google Sheets document.
Whatever the angle value selected in Google Sheet App, angle property is never set.
I've tried to inspect returned JSON, to know if the issue is in Java Client.
But JSON REST API also never returns this property.
Current Result:
.
Expected Result:
Issue and workaround:
When I saw CellFormat of the official document, I thought that the value of textRotation can be retrieved by the fields of sheets(data(rowData(values(userEnteredFormat(textRotation))))) when the method of "spreadsheets.get" is used. But when I tested this, no values are returned. So I thought that this might be a bug. And, when I searched this at the Google issue tracker, I found https://issuetracker.google.com/issues/146274218. From this situation, in the current stage, it seems that the values of textRotation cannot be retrieved by the method of "spreadsheets.get" of Sheets API.
When you want to retrieve the value of textRotation using a script, as a current workaround, you can achieve it using the Web Apps created by Google Apps Script as a wrapper. In this answer, I would like to propose the workaround.
When this workaround is reflected to the flow for your situation, it becomes as follows.
Usage:
1. Create new project of Google Apps Script.
Sample script of Web Apps is a Google Apps Script. So please create a project of Google Apps Script.
If you want to directly create it, please access to https://script.new/. In this case, if you are not logged in Google, the log in screen is opened. So please log in to Google. By this, the script editor of Google Apps Script is opened.
2. Prepare Web Apps side. (server side)
Please copy and paste the following script (Google Apps Script) to the script editor. This script is for the Web Apps. This Web Apps is used as an API.
Server side: Google Apps Script
function doGet(e) {
const key = "sampleKey";
const id = e.parameter.spreadsheetId;
const sheetName = e.parameter.sheetName;
if (e.parameter.key != key || !id || !sheetName) {
return ContentService.createTextOutput(JSON.stringify({message: "Error."})).setMimeType(ContentService.MimeType.JSON);
}
const sheet = SpreadsheetApp.openById(id).getSheetByName(sheetName);
const textRotations = sheet.getDataRange().getTextRotations().map(r => r.map(c => ({angle: c.getDegrees(), vertical: c.isVertical()})));
return ContentService.createTextOutput(JSON.stringify(textRotations)).setMimeType(ContentService.MimeType.JSON);
}
3. Deploy Web Apps.
On the script editor, Open a dialog box by "Publish" -> "Deploy as web app".
Select "Me" for "Execute the app as:".
By this, the script is run as the owner.
Select "Anyone, even anonymous" for "Who has access to the app:".
Of course, you can use the access token for this situation. But in this case, as a simple setting, I use the access key instead of the access token.
Click "Deploy" button as new "Project version".
Automatically open a dialog box of "Authorization required".
Click "Review Permissions".
Select own account.
Click "Advanced" at "This app isn't verified".
Click "Go to ### project name ###(unsafe)"
Click "Allow" button.
Click "OK".
Copy the URL of Web Apps. It's like https://script.google.com/macros/s/###/exec.
When you modified the Google Apps Script, please redeploy as new version. By this, the modified script is reflected to Web Apps. Please be careful this.
3. Testing.
As a simple test, when it requests to the Web Apps using a curl command, it becomes as follows. Please set the spreadsheet ID and sheet name. When the Web Apps is correctly deployed, the values are returned.
$ curl -L "https://script.google.com/macros/s/###/exec?spreadsheetId=###&sheetName=Sheet1&key=sampleKey"
Result:
The data range is used for retrieving the values. So for example, when the values are set to the cells "A1:C3" in "Sheet1", the following result is returned.
[
[{"angle":30,"vertical":false},{"angle":0,"vertical":true},{"angle":0,"vertical":false}],
[{"angle":30,"vertical":false},{"angle":30,"vertical":false},{"angle":0,"vertical":false}]
]
In this case, the cells "A1, A2, B2" have the text rotation with 30 degree. And, the cell "B1" has the vertical direction.
Note:
When you modified the script of Web Apps, please redeploy the Web Apps as new version. By this, the latest script is reflected to Web Apps. Please be careful this.
References:
CellFormat
getTextRotations()
Web Apps
Taking advantage of Web Apps with Google Apps Script
Finally, I've written a JS Library : screen-rotation.js to manage all this stuff.
screenorientation().change(function(){
// My event management
});
It supports iOS, Android & desktop browsers

Add custom button for Jira issue

Is it possible to add button in jira issue without any add-on plugins?
I need one button in issue page, after click on button I should redirect to given button url along with some issue details as parameters.
If you goal to do it without any add-on - try use Announcement banner. You can include js script to banner and draw button from this script by any way easy to you. Announcement banner runs in every single Jira page. Therefore perhaps better to determine that user is on issue page through check url path or page content or whatever else before draw a button.
You can also use any of these addons:
JsIncluder (you can easily include custom JS per project or issue type) (FREE)
ScriptRunner (and its Web Fragments) (PAID)

Umbraco - editing preview window sidebar options

I have a project which is using Umbraco v7.7.9 installed with nuget.
I was wondering if it is possible to change the buttons displayed in the sidebar section when a user selects to preview a content node. Particularly I want to remove the option that allows the user to close the preview.
The reason I want to hide this option is because some of the content the backoffice users will be previewing will not actually be published yet so clicking the close preview button causes an error.
I first asked this question on the Umbraco forums but haven't received a response yet, here is the link to the question: https://our.umbraco.org/forum/extending-umbraco-and-using-the-api/90878-editing-preview-window-sidebar-options
Thank you in advance.
Currently no - it would not be possible without doing hacks in the Core that would be overwritten when you upgrade your site (unless you manually merge your changes in when updating).
If you however don't mind doing that - the file used for the preview function is /umbraco/preview/index.html. You should look for the element with an exitPreview() click handler attached to it.
In later versions (7.10+) this modification will have to be done in /umbraco/Views/Preview/Index.cshtml instead, as these static files will be changed to MVC actions.

Can /consoleText be made the default console page in Jenkins?

Is there any setting I can change in Jenkins to make /consoleText the default page for console outputs? Right now, I have to click on console, and then click on the View as plain text link to get this page.
PS: I'm open to "hack" suggestions, if there's no way to officially do this in Jenkins.
Edit: While I'd be perfectly happy with just making /consoleText as the default page, what would be even better would be to replace the View as plain text link with a View dynamic log link, so that I can access the console link too, in case I need it.
You can try the Sidebar-Link Plugin which will give you the ability to add side links on various Jenkins pages like the build, top level, etc.

Custom CSS not applying to email field in Enfold WP theme on iPhones

I've made a fairly simple "Coming soon" page for a client here and I have a very strange problem. Normally I'm the "go-to" CSS specialist of everyone I personally know, but on this one I am out of resources/ideas trying to figure it out.
On iPhones, using the default browser (Safari), the email input, which has a type="text", just like the name field, displays a white border instead of a blue one. The client reported the problem (she has an iPhone6 - not sure if S or not) and I tested it myself with on an ancient piece (4s) we just keep around the office for testing. For all I know, border-color is a CSS1 property, same as border-width and border-style. They are all applied explicitly so, basically no browser in the world should have a problem rendering it.
I haven't been able to reproduce the issue in any emulator or online snippet tool, so I don't see any point in posting code here. I'm assuming someone with proper iOS/Safari debugging tools/environment might be able to inspect the element and see why the CSS doesn't apply. I also tested the CSS for errors. The one I applied (child theme) is bug free. The parent theme CSS reports some issues but they're mostly vendor prefixes. But it's a good, well designed and well coded theme: Enfold by Kriesi.
EDIT: On further testing I just discovered the color property is also set to white too, when it should be the same blue: #255AA8.
Any idea on how I could debug this (on a Windows 10 machine) is also welcome.
Thank you for your time.
I found the problem... in the themes's .js.
Apparently, it detects if on mobile (somehow they do it properly - as the script doesn't fire in emulators) and if the field requires an email address, the type attribute is changed from text to email via js, so the email keyboard layout pops up when user inputs their email.
Adding
#top div .av-light-form input[type="email"] {
}
to my list of selectors did the job.

Resources