Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom field work has caused break of custom field list

emcardo alarm July 12, 2018

Was doing some work following https://plugins.atlassian.com/plugin/details/27136?_ga=2.68533269.561423346.1531273495-2122636972.1498681592

And inserted some code into the description box.

The issue is the custom list now seems to be broken as per screenshot

See 'Overall risk assessment' doesnt have config options and nothing below it?

Custom field broken.jpg

What I have tried:

Clicking 'back' and removing code

Restoring from backup

However the backup doesnt seem to have removed the custom field list?

 

 

2 answers

1 accepted

1 vote
Answer accepted
David Fischer
Community Champion
July 12, 2018

What happened is, you didn’t properly close the html comment in which the formula appears, which in turn broke the Custom Fields page. 

If you look inside your JIRA log file (atlassian-jira.log), you’ll see ERRORs about that field followed by a URL. Navigate to that url to go to the Edit screen for the custom field, where you’ll be able to fix the formula and the html comment. Just close with -->

emcardo alarm July 12, 2018

Thanks

Checked the log and replicated, it shows:

13-Jul-2018 15:36:20.174 WARNING [http-nio-8080-exec-20] com.sun.jersey.spi.container.servlet.WebComponent.filterFormParameters A servlet request, to the URI https://test-jira.healthshare.health.nz/rest/gadget/1.0/login, contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.


13-Jul-2018 15:36:27.096 WARNING [http-nio-8080-exec-1] com.sun.jersey.spi.container.servlet.WebComponent.filterFormParameters A servlet request, to the URI https://test-jira.healthshare.health.nz/rest/activity-stream/1.0/preferences?_=1531452981622, contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.

When I hit the URL https://test-jira.healthshare.health.nz/rest/activity-stream/1.0/preferences?_=1531452981622 it doesnt give me the page to update the edit screen  for the custom field?

Am I missing something?

I know the field ID from memory I believe it is 11002, can I use this to form up a field URL?

 

Yes I can, I used https://test-jira.healthshare.health.nz/secure/admin/ConfigureCustomField!default.jspa?customFieldId=11002

 

But when I look at the admin screen there is no code to edit:

I tried inserting the example code with known field numbers to see if I can insert some working code

 

That didnt help, tried deleting scheme as it gave me option to do this, still didnt help

Is there a URL I can form to delete the custom field altogether given I know the ID?

David Fischer
Community Champion
July 13, 2018

Just replace "ConfigureCustomField" with "EditCustomField" in the URL you tried:

https://test-jira.healthshare.health.nz/secure/admin/EditCustomField!default.jspa?customFieldId=11002

As for the errors you found in the logs, they are irrelevant to the custom field. You need to look for "com.innovalog.jmcf.fields" - and you'll need to display an issue that is supposed to show the custom field (or re-index Jira) to make the error appear in the logs.

emcardo alarm July 17, 2018

Thanks this worked!

Didnt get round to updating the log level as what I shared was all that was in there.

Nothing more satisfying than seeing my bad code and being able to wipe it!

0 votes
emcardo alarm July 12, 2018

What code did I add?
Was working through https://innovalog.atlassian.net/wiki/spaces/JMCF/overview#JIRAMiscCustomFields-calculatednumberfield

and tried t modify the example code:

<!-- @@Formula: (issue.get("customfield_10114") != null ? issue.get("customfield_10114") : 0) + (issue.get("customfield_10150") != null ? issue.get("customfield_10150") : 0) -->

 

to

 

<!-- @@Formula: (issue.get("customfield_X") x (issue.get("customfield_Y") -->

As I said I went back and removed it as soon as I saw an issue but it doesnt appear it can be corrected on the custom field list screen

Suggest an answer

Log in or Sign up to answer