Friday, August 25, 2023

How to set user in "user picker" type field in JIRA based on text

 There was an issue to setup the user in the user picker type field by having only an e-mail of the user.

The plan:

1. pull out user without domain from the e-mail address

2. log through API to JIRA and make a query to find the selected user

3. pick the active selected user in the user picker field

The first point is rather easy stuff.

The second I needed to encode e-mail with api token to base64 and add that into webrequest header:
Add the Headers with Authorization Basic "<EMAIL>:<API_TOKEN>" encoded to base64.


The 3rd point. 



Useful links:

How to setup API tokens

How to send web reuqest using JIRA Rest API

How to setup value from text field into user picker field



Friday, August 4, 2023

Tags in Google Drive

 

How Are Files Stored in Google Drive?

In Google Drive files and folders are not stored in a tree-like structure. Instead, they are stored in a massive database with indexes to the addresses of the items/files. This structure allows more flexibility and quicker access time when looking among trillions of files in Google. Files and folders are marked with tags – and these tags contain data about the files. Turns out you can use a simple keyboard shortcut to tag files and folders in Google Drive.

Using the “Shift + Z” shortcut allows you to tag your files and folders to other places in your Google Drive. This means you can have your file in a folder that you normally work with, and tag it to also show up in a shared folder. This feature allows the file to be visible in two separate locations, not as copies of the file, but as the same file in two places. This trick is very useful if you have a particular way of working with files but someone you’re sharing them with has their own way of interacting them.

How to Tag Files and Folders in Google Drive

Ready to tag? Here’s how:

  • Click the file or folder you want to tag to another location.
  • Press “Shift + Z” on the keyboard (that’s the “Shift” key and the “Z” key at the same time).
  • A selector will open asking where you’d like to tag the file to. Navigate to the other location.
  • Once you have the new location selected click “Add.” Your file or folder is now present in both locations.

I should check how to make this useful :) 

Tuesday, July 18, 2023

Jira - back to the old sh... stuff

 There are many problems to present info panel during issue creation. Finally there is a proper way.

A special field: Message Custom Field (for edit) might be added and set as info panel. You will need to use setting of the default value. You may add something like this: 

{panel:bgColor=#deebff}

Info *here*

{panel}

or something like this: 

{panel:title=Wincyj info|bgColor=#FFFFCE}

no i takie *takie*

{panel}

Results:


 

useful link to Text rendering in JIRA



Sunday, November 22, 2020

Python #001 - keywords, classes and instances

 

 

I wanna to get to the Google Drive API and JIRA and connect them together. In order to do that I've tried to prepare code in C#. I managed to do that... but if I want to deploy it online I need a server and more skill to that. I decided to switch to Python - there are people who will help me to deploy this kind of app.


So what is Python?

Python is an interpreted, high-level and general-purpose programming language. Python's design philosophy emphasizes code readability with its notable use of significant whitespace. Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale project.

Where to start?

I started with classes and instances. A great read over here: https://docs.python.org/3/tutorial/classes.html

There is "a little bit" different syntax than in JAVA (not so complex). This is my first class

The best example to explain how to use class variable shared by all instances and instance variable unique to each instance:

What about the keywords?

Keywords are special words which are reserved and have a specific meaning. Python has a set of keywords that cannot be used as variables in programs.

All keywords in Python are case sensitive.

Python Keywords Display Using Python Shell 

A quick shortcut to print the list of all the keywords:


 

Sunday, October 25, 2020

Unity #002 - PlayerController script (probably part #01)

There are many methods of coding a player movement. I wrote down two of them (the most convenient ones for my solution). Reminder here - I've been learning Unity for a short period of time so probably there are plenty better methods to do the PlayerController script for this solution :)

The first method is using Unity function AddForce

 

 to a myRigidbody I've added force by Vector2. It will move acc. to forceFactor value

A second method it is function MovePosition


Here there is no physics (no forces) added. I just added vector value to the current position.