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?
What I have tried:
Clicking 'back' and removing code
Restoring from backup
However the backup doesnt seem to have removed the custom field list?
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 -->
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just replace "ConfigureCustomField" with "EditCustomField" in the URL you tried:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.