obsidian-jira-issue icon indicating copy to clipboard operation
obsidian-jira-issue copied to clipboard

JIRA non standard column (custom fields) inserted using the $ symbol are displayed as [object]

Open dooderino opened this issue 2 years ago • 14 comments

We have a custom field called Risk Level and when creating a query there is an auto-completion option called $Risk Level. When using it in the query, it is displayed in the column as [object].

dooderino avatar Jul 18 '22 18:07 dooderino

Hello, in the last version of the plugin I added a new option in the settings to display additional debug information. Could you update the plugin to the last version, enable the debug mode in the plugin settings, open the console with Ctrl+Shift+i and check what is the response you get from Jira?

As soon as the option is enabled the plugin will perform a request to download all the existing custom fields and custom functions: image Take the response of the fields request and check if you have inside the "Risk Level"

It should look something like this: image

If it is not an issue for you, can you send me the JSON related to this field? or tell me if there is something strange you see compared to the other custom fields that works?

marc0l92 avatar Jul 18 '22 18:07 marc0l92

I am getting the [object] output for a custom field named $Product

This is the schema data that I see:

{
	"id": "customfield_13056",
	"key": "customfield_13056",
	"name": "Product",
	"untranslatedName": "Product",
	"custom": true,
	"orderable": true,
	"navigable": true,
	"searchable": true,
	"clauseNames": ["cf[13056]", "Product", "Product[Dropdown]"],
	"schema": {
		"type": "option",
		"custom": "com.atlassian.jira.plugin.system.customfieldtypes:select",
		"customId": 13056
	}
},

In the response text, I see the following for what the product should display:

"customfield_13056": {
				"self": "https://xxx.atlassian.net/rest/api/2/customFieldOption/11080",
				"value": "A Product Name",
				"id": "11080"
			},```

After seeing the schema, I also tried

Please let me know if I can provide other information to help diagnose. I'm happy to try anything as well.

jwthomp avatar Jul 29 '22 15:07 jwthomp

In the first comment the custom field was $Risk Level and now you are talking about $Product. I'm a bit confused. Are they the same field? or do they have the same issue?

Are you able to see $Product in the auto-completion ?

marc0l92 avatar Jul 29 '22 16:07 marc0l92

As you can see the content of $Product is actually an object. This usually happen when the field is handled by a Jira plugin. What would you like to see in the column of $Product when the field content is:

"customfield_13056": {
  "self": "https://xxx.atlassian.net/rest/api/2/customFieldOption/11080",
  "value": "A Product Name",
  "id": "11080"
}

Do you know what is the plugin that handle this custom field?

marc0l92 avatar Jul 29 '22 16:07 marc0l92

In the first comment the custom field was $Risk Level and now you are talking about $Product. I'm a bit confused. Are they the same field? or do they have the same issue?

Are you able to see $Product in the auto-completion ?

Risk Level was mine, Jeff is another user hitting the same issue but with a different custom field.

dooderino avatar Jul 29 '22 17:07 dooderino

Hahaha sorry, I assumed that I was talking always with the same person. @dooderino , did you manage to find the issue? Or can you give me some additional information like @jwthomp did?

marc0l92 avatar Jul 29 '22 18:07 marc0l92

Hello @dooderino @jwthomp ,

you should be able to see some improvements, if you update the plugin to version 1.25.0.

Let me know if it is enough

marc0l92 avatar Sep 04 '22 19:09 marc0l92

Hi, first of all, congratulations on this great plugin! I have the same issue mentioned here, in my case the object "Sprint" looks like this:

[{"id":2314,"name":"PDET PI 22.4 Sprint 1","state":"future","boardId":586,"goal":"","startDate":"2022-10-17T04:00:00.000Z","endDate":"2022-10-31T04:00:00.000Z"}]


I would like to get the object fields individually, like: Sprint.name

Is this planned to the next releases?

Thanks!

igorpereirabr1 avatar Oct 13 '22 15:10 igorpereirabr1

Hello @marc0l92 ,

If it can help, here is another log. This is the display of a custom field :

{"self":"https://mycompanyserver.com/csbugtrack/rest/api/2/customFieldOption/10003","value":"PROD","id":"10003","disabled":false}

and here is the the response from the debug log :

\"customfield_10000\":{\"self\":\"https://mycompanyserver.com/csbugtrack/rest/api/2/customFieldOption/10003\",\"value\":\"PROD\",\"id\":\"10003\",\"disabled\":false}

the entire object is shown in the result render instead of the value. Maybe I missed something as I've got the version 1.31 and you were talking about improvements in the 1.25

thank you for this wonderful plugin!

BaronPellatarte avatar Nov 03 '22 20:11 BaronPellatarte

If it helps, I use a lot of custom fields, and the problem seems to be related to drop-down fields that have values. Custom date fields display appropriately, as do custom Boolean fields and custom text fields.

jbaughman42 avatar May 19 '23 19:05 jbaughman42