Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev/core#1652 - Check for change case type activity on case activity form doesn't work #16785

Merged
merged 1 commit into from
Mar 23, 2020

Conversation

demeritcowboy
Copy link
Contributor

@demeritcowboy demeritcowboy commented Mar 15, 2020

Overview

https://lab.civicrm.org/dev/core/issues/1652

This isn't the thing I was looking to fix but getting this out of the way will make it less distracting. I'm not sure what the scenario for this check is in real life but if all your case types are disabled then the intent seems to be that when you try to change a case type it will warn you when go to create a Change Case Type activity, but it's flawed in a couple ways. Given the rarity of the situation I've opted for the simple route of making the field required, so at least you don't get a fatal error on save.

To reproduce:

  1. Create a case.
  2. Disable all your case types.
  3. Go back to manage case and create a Change Case Type activity.
  4. Just click Save.
  5. Before it would give a fatal error. Now it says field is required.

Technical Details

Detailed in lab ticket. Has name/label issues as well as a check against !something which seems to be wrong.

Since one of the deleted lines is an assignment of $session, I checked to see if it was used outside the deleted lines but it isn't.

Comments

Has test, which has nothing to do with this issue but it was ... hard ... so I opted for any kind of test. I'd argue the attached test is more useful, since it's for contact search which is used everywhere.

@civibot
Copy link

civibot bot commented Mar 15, 2020

(Standard links)

@civibot civibot bot added the master label Mar 15, 2020
@demeritcowboy demeritcowboy changed the title [WIP] dev/core#1652 - Check for change case type activity on case activity form doesn't work dev/core#1652 - Check for change case type activity on case activity form doesn't work Mar 16, 2020
@demeritcowboy
Copy link
Contributor Author

jenkins retest this please

@jaapjansma
Copy link
Contributor

test this please

@jaapjansma
Copy link
Contributor

  • General standards
    • Explain (r-explain)
      • PASS : The goal/problem/solution have been adequately explained in the PR.
    • User impact (r-user)
    • Documentation (r-doc)
      • PASS: The changes do not require documentation.
    • Run it (r-run)
      • PASS: We tested it in dmaster and in test from this PR and followed the instructions from @demeritcowboy
  • Developer standards
    • Technical impact (r-tech)
      • PASS: The change preserves compatibility with existing callers/code/downstream.
    • Code quality (r-code)
      • PASS: The functionality, purpose, and style of the code seems clear+sensible.
    • Maintainability (r-maint)
      • PASS: The change sufficiently improves test coverage.
    • Test results (r-test)
      • PASS: The test results are all-clear.

@eileenmcnaughton or @mattwire could one of you merge this PR?

@mattwire mattwire merged commit af99a6a into civicrm:master Mar 23, 2020
@demeritcowboy demeritcowboy deleted the weird-casetype-check branch March 23, 2020 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants