Discussions
-
How to find issues where one date field is greater/smaller/equal than/to another date field
Use case: 1. In project TOP you have an issue type Dev Task which has two date-picker fields, My Due Date and Completed On. 2. You want to find all issues where the completion date is greater than the due date. JQL does not let you compare two date fields, but ScriptRunner add-on does. As per ScriptRunner documentation,…
-
How to Find Unused Custom Fields in Jira Cloud Using REST API in Python
Algorithm: * Get all custom fields (CFs), using HTTP GET <server>/rest/api/3/field/search * You need to get the CF's screens and contexts, so the query string would is: 'type=custom&orderBy=name&expand=screensCount,contextsCount' * Build a dict of all unused CFs (dict key is ID, since custom field names are not unique) * A…
-
How to Find Unused Issue Types in Jira Cloud Using REST API in Python
The algorithms is this: * Get all issue types, using HTTP GET <server>/rest/api/3/issuetype* Build a dict of all issue types (dict key is ID, since issue type name is not unique) * Get all projects, with the issue types of each:* /rest/api/3/project/search?expand=issueTypes * For each project, get its contained issue…
-
Kanban board on JSM project displays too many issues in Done column
Hello, As discussed elsewhere, JSM projects cannot have Kanban/Scrum boards attached. So I used the ugly hack explained here (create a board via the boards UI, use a filter that queries the JSM project and then place the board elsewhere). It's all well & good, but the Done column (collecting all issues with Closed status)…
-
Screen configuration - Moving a field from the main tab to another tab is a pain
Using Jira 8.3. * I have a screen with many fields (50 or so). * I created 4 new custom fields and added them to this screen. * By default they are added as the last fields in the screen. * Now I create a new tab and I want to move the fields to the new tab. The process: 1. You cannot select multiple fields - you have to…
-
Sending mail via Jira automation - does it support CSS?
I have a few fields in my issue that I want to put in a table in the body of the outgoing mail. Currently, I use this: <b>Field 1: </b>{{issue.fields.field_1}}<br> <b>Field 2: </b>{{issue.fields.field_2}}<br> This works, but is ugly. I want to format these fields in a table, like this (header row, borders and grid): Field…
-
Jira Cloud REST API (Python) - How to set value for a cascaded select field
Following some posts I've seen, I am using the Python REST API to create a new issue and passing this as part of the dict of the fields: 'customfield_11585': { # 'my_field' - a cascaded selection field 'value': 'fu', # parent value: 'fu' (id=26637) 'child': { 'id': '26792' # child value: 'bar' (id=26792) } }, This results…
-
What is this Service Desk workflow transition property servicedesk.customer.transition.resolution
I see this property (without a value) on some transitions in a workflow that is visible from the customer portal. Maybe all other transitions have it, I have not checked. Any idea what it means? Thanks
-
How to join the Atlassian community with a personal mail
I am leaving my current company in a few days and I want to stay connected to the community, using my personal mail, as I need to stay current with Atlassian-related news and updates. How do I do that? Thanks
-
How to hide Priority field in Jira Service Desk Customer Portal
Priority is a system field. I want the Service Desk Agents to view & modify it. However, I want to hide it in the Customer Portal because it's internal to the Agents only. When editing fields in any request type, it's not possible to hide it. Any idea?
-
When exporting from issue navigator, not all columns are exported
I have an issue type with 13 custom fields. I need to export the issues with all the custom fields and with the relevant system fields (issue type, summary, description, etc.) When I run the query and then export with Export --> Excel (Current fields) some fields are missing. I've also tried the add-on Better Excel Plugin…
-
Workflow validator to check if the assignee is not one of a list specific of users (uses JMWE)
I recently had a requirement that certain workflow transitions should fail if the assignee is one of three specific users. Note that using this method, any number of accounts can be checked. I am using the JMWE-provided build-your-own scripted validator, using this simple code: let bad_users = ["abcdabcdabcdabcd",…
-
Automation and Smart Values - Fails to write a number field with integer value
I have a datetime picker field called 'Event Started At' with ID 11726. I want to define a smart value that will calculate the time between now and value of the above field. In the automation, I added a Create Variable action: Variable name: DTDuration Smart value: {{now.diff(issue.customfield_11726).hours.abs}} This…
-
Jira REST API Get Fields does not distinguish between some field types
I'm using the above REST API (GET /rest/api/3/field) to get all fields with their types. See here: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-fields/#api-rest-api-3-field-get When I examine the resulting JSON, each custom fields has the dict entry some_entry['schema']['type'], the value…
-
Problem with REST API issue search by Custom Field
Background In our Jira Cloud, we have > 1600 custom fields (don't ask why...). I took upon myself to perform a cleanup of the CFs. I am a Jira admin, of course. A CF can be deleted if all the below conditions are met: * It is not a LOCKED field * It is not included in any screens * Its Last Used date is empty * It does not…
-
How to render contents of text field in a specific color
I have a multi-line text field (optional). I would like the text (when there is text) to be in displayed in red, which means to surround it with [color:red] <text here> [color] (using square brackets here to avoid rendering :-)) I can probably hack a behaviour that will edit the field value when field changes, but it's…
-
Running a query from inside a Jira issue
Background In one of our Jira projects, we have a cascaded select field in which the parent is the product name and the child is the customer name. The field is called 'Prod-Cust'. So we have values like this: * ProdA - Customer1 * ProdA - Customer2 * ProdB - Customer2 * ProdB - Customer3 Problem Description The owner of…
-
How to get group name from a group picker field
I have a custom field which is a radio button, its values are group names (say G-1, G-2). These groups are defined in the server. Code below omits the imports for bervity def groupManager = ComponentAccessor.groupManager def customFieldManager = ComponentAccessor.customFieldManager def groupNameField =…
-
JSM Customer Portal - cannot add field help to request form
I have a Jira Service Management (cloud) project with the associated customer portal, which supports several request types. In the request definition (mapped to an issue type), one selects fields from the issue type. In this configuration page, for each field, you can set (among other options): 1. The display name of the…
-
Automation to delete unused issue types
After migration a subset of projects from Jira server to cloud, the cloud instance has a large number of issue types that are not included in any issue type scheme (apart from the default one, of course). I can delete them in the UI, one by one, but that's not a good use of my time. I can also delete them using REST API,…
-
Jira (and other black arts) admin
Administering Jira for a few years. Recently finished migration of 35 projects from two Jira servers to cloud.
-
Jira Cloud: How to add watchers in the Create transition
I have followed the example given in this thread: https://community.atlassian.com/t5/Jira-questions/ScriptRunner-for-Jira-Cloud-Add-watcher-in-ScriptRunner-Post/qaq-p/1177008 which points to this example: https://bitbucket.org/snippets/Adaptavist/yAdX6X?_ga=2.267944206.120189328.1585505760-1987078914.1573938112 I created a…
-
How to download all options of a selection field (simple or cascaded)
I have a cascaded selection field with ~ 40 options, some of them having 2nd-level options (cascaded). I need to import all the options into a new field on a different Jira server. The import would be easy - use ScriptRunner built-in script 'bulk import custom field values' - I've done it several times and it works like a…
-
Editing a custom single-select field opens a full edit popup screen (Jira Server)
I have a custom field with 5 options. When I create an issue, I get a drop-down with None and the other 5 options. So far, so good. However, when I view an existing issue and go to that field, I get the pencil icon and it says, Edit popup form enabled. And when I click on the pencil, I get a popup with the full issue.…
-
How to copy a custom field definition, changing field type but keeping the allowed values
I defined a custom field, Customer Name, of type Select List (single choice), and defined, manually, 140 values for the choice. I need to define another custom field, Other Affected Customers, with type Select List (multiple choices) using the same list of 140 values. What I see is that once a custom field is defined, you…
-
How to get list of all Jira server fields (system and custom) via REST-API
Use curl in a Linux Bash script: #!/bin/bash admin_user=fu admin_password=bar jira_server="https://jira.acme.com" api_version=2 url_part2="/rest/api/${api_version}/field" curl -k -u ${admin_user}:${admin_password} -X GET -H "Accept: application/json" ${jira_server}${url_part2} \ | jq '.' > raw_file.json # Extract field…
-
How to export issues and their links via JSON instead of CSV
Problem: The built-in JIRA Export to CSV only lists the linked issue's key, but not the link type. This is a known limitation. For example, see here: Known Issue. I am performing an export of many issues in order to import them via CSV to another JIRA server, and I need to know the link type. The solution that I devised is…
-
Service Desk Automation - how to set 'Project Default'
I have a Service Desk (SD) project. I created an automation that is triggered when an issue is created that has Severity == S1. The automation adds a comment to the issue. Please see the screenshot below. What I found out the if I use the 2nd option (Run as the user who triggered the rule), is: * when an SD Agent creates…