Hello -
I've been trying to find a solution to count the number of Issues that contain ANY child fields within a parent field on a cascading list custom field.
What I'm trying to achieve, via the basic pie chart gadget on the dashboard, is to build a filter that shows the number of issues that exist within a parent field in a cascading select list.
For example: I have 2 parent fields with some child field options:
- Virginia
- Richmond, Charlottesville, Culpeper
- North Carolina
- Raleigh, Chapel Hill, Durham
I want the pie chart to show Virginia and North Carolina, and then be able to tell me how many issues exist with ANY of the child selections.
Does that make sense? I've been struggling to articulate this, which has made it more difficult to find a solution.
So far the only JQL I see is the cascadeOption() syntax, and that doesn't seem to be the solution. Any ideas?
finally found answer:
had to reorder fields
headers = {"Content-Type": "application/json"}
data = {"fields":{"labels":["MANAGED_SERVICES"],"reporter":{"name":"user"},"assignee":{"name":"emergencyadmin"},"project":{"key":"CP"},"summary":"OC SPLA usage report for {previous_month} {currentYear},"description":"some descr","issuetype":{"name":"Managed Service"},"customfield_10107":{"id":"10505"},"customfield_10006":"CP-3289"}}}
Could you verify that you've got "labels" on the screens for project CP and issue type "Managed Service"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for reply, i posted a picture-managed_service is visible from drop-down menu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @[deleted], Can you include the 'creator' and 'labels' attributes with in the project scope in the JSON file. Like below.
{"fields":{"project":{"key":"CP"},"summary":"OC SPLA usage report for {current_month} {currentYear}".format(**locals()),"description":"Review OC SPLA usage report","issuetype":{"name":"Managed Service"},"customfield_10107":{"id":"10505"},"customfield_10006":"CP-3289","creator":{"displayname":"some user"},"labels": ["MANAGED_SERVICES"]}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"creator": { "active": true, "avatarUrls": { "16x16": "https://secure.gravatar.com/avatar/5d92f3ce51d4a090cdcb9b77ee890989?d=mm&s=16", "24x24": "https://secure.gravatar.com/avatar/5d92f3ce51d4a090cdcb9b77ee890989?d=mm&s=24", "32x32": "https://secure.gravatar.com/avatar/5d92f3ce51d4a090cdcb9b77ee890989?d=mm&s=32", "48x48": "https://secure.gravatar.com/avatar/5d92f3ce51d4a090cdcb9b77ee890989?d=mm&s=48" }, "displayName": "some user", "emailAddress": "someuser@company.com", "key": "someuser", "name": "someuser", "self": "https://jira.corp.company.com/rest/api/2/user?username=someuser", "timeZone": "Europe/Belgrade" },
"labels": [ "MANAGED_SERVICES" ], "lastViewed": "2018-06-07T10:09:11.206+0000",
sorry for bad formatting
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dragan,
is it your exactly sent json?
{"fields":{"project":{"key":"CP"},"summary":"OC SPLA usage report for {current_month} {currentYear}".format(**locals()),"description":"Review OC SPLA usage report","issuetype":{"name":"Managed Service"},"customfield_10107":{"id":"10505"},"customfield_10006":"CP-3289"},"creator":{"displayname":"some user"},"labels": ["MANAGED_SERVICES"]}
It has something strange like .format(**locals()).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aleksandr,
current_month = datetime.now().strftime('%B')
currentYear = datetime.now().year
subject contains current month and year, that's why i put .format(**locals()), it's python interpolation syntax
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.