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 :)